barsuift.simLife.j3d.util
Class AreaHelper

java.lang.Object
  extended by barsuift.simLife.j3d.util.AreaHelper

public final class AreaHelper
extends java.lang.Object


Method Summary
static double computeArea(javax.vecmath.Point3d p1, javax.vecmath.Point3d p2, javax.vecmath.Point3d p3)
          Computes the area of the given triangle, formed by the given 3 points
static double computeArea(javax.media.j3d.TriangleArray triangle)
          Computes the area of the given triangle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

computeArea

public static double computeArea(javax.media.j3d.TriangleArray triangle)
Computes the area of the given triangle.

Parameters:
triangle - the triangle to compute area for
Returns:
the area of the triangle

computeArea

public static double computeArea(javax.vecmath.Point3d p1,
                                 javax.vecmath.Point3d p2,
                                 javax.vecmath.Point3d p3)
Computes the area of the given triangle, formed by the given 3 points

Parameters:
p1 - first point of the triangle
p2 - second point of the triangle
p3 - third point of the triangle
Returns:
the area of the triangle


Copyright © 2010. All Rights Reserved.