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 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 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 void 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 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 void projectOntoAxis(javax.vecmath.Point3f point, javax.vecmath.Point3f axisA, javax.vecmath.Vector3f axisUnitVector, javax.vecmath.Vector3f vectorProjection)
           
 
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

computeTorsion

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

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)

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)

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)

getNormalFromCenter

public static void getNormalFromCenter(javax.vecmath.Point3f ptCenter,
                                       javax.vecmath.Point3f ptA,
                                       javax.vecmath.Point3f ptB,
                                       javax.vecmath.Point3f ptC,
                                       boolean isOutward,
                                       javax.vecmath.Vector3f normal)

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)