JavaView® v2.00.008

jv.vecmath
Class PuReflect

java.lang.Object
  |
  +--jv.vecmath.PuReflect

public class PuReflect
extends java.lang.Object

Utility class with static methods to compute reflection and other symmetry matrices.

Version:
03.10.99, 1.10 revised (kp) Renamed from PdReflect to PuReflect.
11.07.99, 1.01 revised (kp) Included in JavaView, method mult43() moved to PdVector.
00.06.99, 1.00 created (kp) Converted from my c-code.
Author:
Konrad Polthier

Constructor Summary
PuReflect()
           
 
Method Summary
static boolean makeRotation(PdMatrix mat, PdVector axis, double angle)
          Generate a (3*3)-rotation matrix to rotate around axis through origin with given angle.
static PdMatrix planeReflect(PdVector a, PdVector normal)
          Generate a (4*4)-matrix to reflect in plane given by base point and plane normal.
static PdMatrix planeReflect(PdVector a, PdVector b, PdVector c)
          Generate a (4*4)-matrix to reflect in plane given by three vertices on the plane.
static PdMatrix pointReflect(PdVector p)
          Generate a (4*4)-matrix to invert space w.r.t. to a given fixed point.
static PdMatrix rotateLine(PdVector base, PdVector dir)
          Generate a (4*4)-matrix to rotate around axis base+t*dir by 180 degrees.
static PdMatrix rotateLine(PdVector base, PdVector dir, double fi)
          Generate a (4*4)-matrix to rotate around axis base+t*dir by given angle.
static PdMatrix translate(PdVector vec)
          Generate a (4*4)-matrix to translate by a given vector p = p + vec.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PuReflect

public PuReflect()
Method Detail

makeRotation

public static boolean makeRotation(PdMatrix mat,
                                   PdVector axis,
                                   double angle)
Generate a (3*3)-rotation matrix to rotate around axis through origin with given angle.
Parameters:
mat - Matrix to hold the transformation matrix.
axis - direction of rotation axis, need not be normalized
angle - angle in radians about to rotate
Returns:
false missing axis or problems in its normalization

rotateLine

public static PdMatrix rotateLine(PdVector base,
                                  PdVector dir)
Generate a (4*4)-matrix to rotate around axis base+t*dir by 180 degrees.
Parameters:
base - Arbitrary point on rotation axis.
dir - Direction of rotation axis, need not be normalized
Returns:
Rotation matrix

rotateLine

public static PdMatrix rotateLine(PdVector base,
                                  PdVector dir,
                                  double fi)
Generate a (4*4)-matrix to rotate around axis base+t*dir by given angle.
Parameters:
base - Arbitrary point on rotation axis.
dir - Direction of rotation axis, need not be normalized
angle - Angle in radians about to rotate.
Returns:
Rotation matrix

planeReflect

public static PdMatrix planeReflect(PdVector a,
                                    PdVector b,
                                    PdVector c)
Generate a (4*4)-matrix to reflect in plane given by three vertices on the plane.
Parameters:
a, - b, c Three points on the plane.
Returns:
Reflection matrix

planeReflect

public static PdMatrix planeReflect(PdVector a,
                                    PdVector normal)
Generate a (4*4)-matrix to reflect in plane given by base point and plane normal.
Parameters:
base - Arbitrary point on plane.
normal - Normal vector orthogonal to plane
Returns:
Reflection matrix

pointReflect

public static PdMatrix pointReflect(PdVector p)
Generate a (4*4)-matrix to invert space w.r.t. to a given fixed point.
Parameters:
p - Arbitrary point as inversion center.
Returns:
Inversion matrix

translate

public static PdMatrix translate(PdVector vec)
Generate a (4*4)-matrix to translate by a given vector p = p + vec.
Parameters:
vec - Translation vector.
Returns:
Translation matrix

JavaView® v2.00.008

The software JavaView® is copyright protected. All Rights Reserved.