org.jmol.util
Class Measure

java.lang.Object
  extended by org.jmol.util.Measure

public final class Measure
extends java.lang.Object


Field Summary
static float radiansPerDegree
           
 
Constructor Summary
Measure()
           
 
Method Summary
static void calcAveragePoint(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Point3f pointC)
           
static void calcAveragePointN(javax.vecmath.Point3f[] points, int nPoints, javax.vecmath.Point3f averagePoint)
           
static void calcBestAxisThroughPoints(javax.vecmath.Point3f[] points, javax.vecmath.Point3f axisA, javax.vecmath.Vector3f axisUnitVector, javax.vecmath.Vector3f vectorProjection, int nTriesMax)
           
static void calcNormalizedNormal(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Point3f pointC, javax.vecmath.Vector3f vNormNorm, javax.vecmath.Vector3f vAB, javax.vecmath.Vector3f vAC)
           
static Quaternion calculateQuaternionRotation(javax.vecmath.Point3f[][] centerAndPoints, float[] retStddev, boolean doReport)
           
static void calcXYNormalToLine(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Vector3f vNormNorm)
           
static float computeAngle(javax.vecmath.Tuple3f pointA, javax.vecmath.Tuple3f pointB, javax.vecmath.Tuple3f pointC, boolean asDegrees)
           
static float computeAngle(javax.vecmath.Tuple3f pointA, javax.vecmath.Tuple3f pointB, javax.vecmath.Tuple3f pointC, javax.vecmath.Vector3f vectorBA, javax.vecmath.Vector3f vectorBC, boolean asDegrees)
           
static java.lang.Object computeHelicalAxis(java.lang.String id, int tokType, javax.vecmath.Point3f a, javax.vecmath.Point3f b, Quaternion dq)
           
static float computeTorsion(javax.vecmath.Tuple3f p1, javax.vecmath.Tuple3f p2, javax.vecmath.Tuple3f p3, javax.vecmath.Tuple3f p4, boolean asDegrees)
           
static float distanceToPlane(javax.vecmath.Point4f plane, float d, javax.vecmath.Point3f pt)
           
static float distanceToPlane(javax.vecmath.Point4f plane, javax.vecmath.Point3f pt)
           
static float distanceToPlane(javax.vecmath.Vector3f norm, float w, javax.vecmath.Point3f pt)
           
static float findAxis(javax.vecmath.Point3f[] points, int nPoints, javax.vecmath.Point3f axisA, javax.vecmath.Vector3f axisUnitVector, javax.vecmath.Vector3f vectorProjection)
           
static javax.vecmath.Point3f[] getCenterAndPoints(java.util.List vPts)
           
static float getDirectedNormalThroughPoints(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Point3f pointC, javax.vecmath.Point3f ptRef, javax.vecmath.Vector3f vNorm, javax.vecmath.Vector3f vAB, javax.vecmath.Vector3f vAC)
           
static boolean getNormalFromCenter(javax.vecmath.Point3f ptCenter, javax.vecmath.Point3f ptA, javax.vecmath.Point3f ptB, javax.vecmath.Point3f ptC, boolean isOutward, javax.vecmath.Vector3f normal)
           
static float getNormalThroughPoints(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Point3f pointC, javax.vecmath.Vector3f vNorm, javax.vecmath.Vector3f vAB, javax.vecmath.Vector3f vAC)
           
static javax.vecmath.Point4f getPlaneThroughPoint(javax.vecmath.Point3f pt, javax.vecmath.Vector3f normal)
           
static javax.vecmath.Point4f getPlaneThroughPoints(javax.vecmath.Point3f pointA, javax.vecmath.Point3f pointB, javax.vecmath.Point3f pointC, javax.vecmath.Vector3f vNorm, javax.vecmath.Vector3f vAB, javax.vecmath.Vector3f vAC)
           
static float getRmsd(javax.vecmath.Point3f[][] centerAndPoints, Quaternion q)
           
static float getTransformMatrix4(java.util.List ptsA, java.util.List ptsB, javax.vecmath.Matrix4f m, javax.vecmath.Point3f centerA)
           
static void moveToPlane(javax.vecmath.Point4f plane, javax.vecmath.Point3f a)
           
static void projectOntoAxis(javax.vecmath.Point3f point, javax.vecmath.Point3f axisA, javax.vecmath.Vector3f axisUnitVector, javax.vecmath.Vector3f vectorProjection)
           
static java.util.List transformPoints(java.util.List vPts, javax.vecmath.Matrix4f m4, javax.vecmath.Point3f center)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

radiansPerDegree

public static final float radiansPerDegree
See Also:
Constant Field Values
Constructor Detail

Measure

public Measure()
Method Detail

computeAngle

public static float computeAngle(javax.vecmath.Tuple3f pointA,
                                 javax.vecmath.Tuple3f pointB,
                                 javax.vecmath.Tuple3f pointC,
                                 javax.vecmath.Vector3f vectorBA,
                                 javax.vecmath.Vector3f vectorBC,
                                 boolean asDegrees)

computeAngle

public static float computeAngle(javax.vecmath.Tuple3f pointA,
                                 javax.vecmath.Tuple3f pointB,
                                 javax.vecmath.Tuple3f pointC,
                                 boolean asDegrees)

computeTorsion

public static float computeTorsion(javax.vecmath.Tuple3f p1,
                                   javax.vecmath.Tuple3f p2,
                                   javax.vecmath.Tuple3f p3,
                                   javax.vecmath.Tuple3f p4,
                                   boolean asDegrees)

computeHelicalAxis

public static java.lang.Object computeHelicalAxis(java.lang.String id,
                                                  int tokType,
                                                  javax.vecmath.Point3f a,
                                                  javax.vecmath.Point3f b,
                                                  Quaternion dq)

getPlaneThroughPoints

public static javax.vecmath.Point4f getPlaneThroughPoints(javax.vecmath.Point3f pointA,
                                                          javax.vecmath.Point3f pointB,
                                                          javax.vecmath.Point3f pointC,
                                                          javax.vecmath.Vector3f vNorm,
                                                          javax.vecmath.Vector3f vAB,
                                                          javax.vecmath.Vector3f vAC)

getPlaneThroughPoint

public static javax.vecmath.Point4f getPlaneThroughPoint(javax.vecmath.Point3f pt,
                                                         javax.vecmath.Vector3f normal)

distanceToPlane

public static float distanceToPlane(javax.vecmath.Point4f plane,
                                    javax.vecmath.Point3f pt)

distanceToPlane

public static float distanceToPlane(javax.vecmath.Point4f plane,
                                    float d,
                                    javax.vecmath.Point3f pt)

distanceToPlane

public static float distanceToPlane(javax.vecmath.Vector3f norm,
                                    float w,
                                    javax.vecmath.Point3f pt)

calcNormalizedNormal

public static void calcNormalizedNormal(javax.vecmath.Point3f pointA,
                                        javax.vecmath.Point3f pointB,
                                        javax.vecmath.Point3f pointC,
                                        javax.vecmath.Vector3f vNormNorm,
                                        javax.vecmath.Vector3f vAB,
                                        javax.vecmath.Vector3f vAC)

getDirectedNormalThroughPoints

public static float getDirectedNormalThroughPoints(javax.vecmath.Point3f pointA,
                                                   javax.vecmath.Point3f pointB,
                                                   javax.vecmath.Point3f pointC,
                                                   javax.vecmath.Point3f ptRef,
                                                   javax.vecmath.Vector3f vNorm,
                                                   javax.vecmath.Vector3f vAB,
                                                   javax.vecmath.Vector3f vAC)

getNormalThroughPoints

public static float getNormalThroughPoints(javax.vecmath.Point3f pointA,
                                           javax.vecmath.Point3f pointB,
                                           javax.vecmath.Point3f pointC,
                                           javax.vecmath.Vector3f vNorm,
                                           javax.vecmath.Vector3f vAB,
                                           javax.vecmath.Vector3f vAC)

moveToPlane

public static void moveToPlane(javax.vecmath.Point4f plane,
                               javax.vecmath.Point3f a)

getNormalFromCenter

public static boolean getNormalFromCenter(javax.vecmath.Point3f ptCenter,
                                          javax.vecmath.Point3f ptA,
                                          javax.vecmath.Point3f ptB,
                                          javax.vecmath.Point3f ptC,
                                          boolean isOutward,
                                          javax.vecmath.Vector3f normal)
Parameters:
ptCenter -
ptA -
ptB -
ptC -
isOutward -
normal -
Returns:
true if winding is proper; false if not

calcXYNormalToLine

public static void calcXYNormalToLine(javax.vecmath.Point3f pointA,
                                      javax.vecmath.Point3f pointB,
                                      javax.vecmath.Vector3f vNormNorm)

projectOntoAxis

public static void projectOntoAxis(javax.vecmath.Point3f point,
                                   javax.vecmath.Point3f axisA,
                                   javax.vecmath.Vector3f axisUnitVector,
                                   javax.vecmath.Vector3f vectorProjection)

calcBestAxisThroughPoints

public static void calcBestAxisThroughPoints(javax.vecmath.Point3f[] points,
                                             javax.vecmath.Point3f axisA,
                                             javax.vecmath.Vector3f axisUnitVector,
                                             javax.vecmath.Vector3f vectorProjection,
                                             int nTriesMax)

findAxis

public static float findAxis(javax.vecmath.Point3f[] points,
                             int nPoints,
                             javax.vecmath.Point3f axisA,
                             javax.vecmath.Vector3f axisUnitVector,
                             javax.vecmath.Vector3f vectorProjection)

calcAveragePoint

public static void calcAveragePoint(javax.vecmath.Point3f pointA,
                                    javax.vecmath.Point3f pointB,
                                    javax.vecmath.Point3f pointC)

calcAveragePointN

public static void calcAveragePointN(javax.vecmath.Point3f[] points,
                                     int nPoints,
                                     javax.vecmath.Point3f averagePoint)

getCenterAndPoints

public static javax.vecmath.Point3f[] getCenterAndPoints(java.util.List vPts)

getTransformMatrix4

public static float getTransformMatrix4(java.util.List ptsA,
                                        java.util.List ptsB,
                                        javax.vecmath.Matrix4f m,
                                        javax.vecmath.Point3f centerA)

calculateQuaternionRotation

public static Quaternion calculateQuaternionRotation(javax.vecmath.Point3f[][] centerAndPoints,
                                                     float[] retStddev,
                                                     boolean doReport)

getRmsd

public static float getRmsd(javax.vecmath.Point3f[][] centerAndPoints,
                            Quaternion q)

transformPoints

public static java.util.List transformPoints(java.util.List vPts,
                                             javax.vecmath.Matrix4f m4,
                                             javax.vecmath.Point3f center)