cct.vecmath
Class Geometry3d

java.lang.Object
  extended by cct.vecmath.Geometry3d

public class Geometry3d
extends java.lang.Object

Title: Picking

Description:

Copyright: Copyright (c) 2005

Company:


Field Summary
(package private) static float SMALL_NUM
           
 
Method Summary
static void rotatePointAroundArbitraryAxis(Point3fInterface point, float theta, Point3fInterface p1, Point3fInterface p2)
          Rotates "point" around axis p2-p1 by angle theta
static double segmentToSegmentDistance(Segment3f s1, Segment3f s2)
          Calculates distance between two segments
static double segmentToSegmentDistance(Segment3f s1, Segment3f s2, vPoint3f p1, vPoint3f p2)
          Calculates distance between two segments and returns coordinates of the closest points on each segment
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SMALL_NUM

static float SMALL_NUM
Method Detail

rotatePointAroundArbitraryAxis

public static void rotatePointAroundArbitraryAxis(Point3fInterface point,
                                                  float theta,
                                                  Point3fInterface p1,
                                                  Point3fInterface p2)
Rotates "point" around axis p2-p1 by angle theta

Parameters:
point - Point3fInterface
theta - float
p1 - Point3fInterface
p2 - Point3fInterface

segmentToSegmentDistance

public static double segmentToSegmentDistance(Segment3f s1,
                                              Segment3f s2)
Calculates distance between two segments

Parameters:
s1 - Segment3f
s2 - Segment3f
Returns:
double

segmentToSegmentDistance

public static double segmentToSegmentDistance(Segment3f s1,
                                              Segment3f s2,
                                              vPoint3f p1,
                                              vPoint3f p2)
Calculates distance between two segments and returns coordinates of the closest points on each segment

Parameters:
s1 - Segment3f
s2 - Segment3f
p1 - Point3fInterface
p2 - Point3fInterface
Returns:
double