barsuift.simLife.j3d.util
Class ProjectionHelper

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

public final class ProjectionHelper
extends java.lang.Object

Helper class to "project" a point on the "ground".

Projecting a point means setting its Y value to 0. Thus a (1,2,3) point is projected to (1,0,3).

The new point is the same one but on the X-Z plan.


Method Summary
static javax.vecmath.Point3d getProjectionPoint(javax.vecmath.Point3d originPoint)
          Project the given point to the X-Z plan, by setting the Y value to 0.
static javax.vecmath.Point3f getProjectionPoint(javax.vecmath.Point3f originPoint)
          Project the given point to the X-Z plan, by setting the Y value to 0.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getProjectionPoint

public static javax.vecmath.Point3d getProjectionPoint(javax.vecmath.Point3d originPoint)
Project the given point to the X-Z plan, by setting the Y value to 0.

Parameters:
originPoint - the point to project
Returns:
a new point, with the same X and Z values, but Y set to 0.

getProjectionPoint

public static javax.vecmath.Point3f getProjectionPoint(javax.vecmath.Point3f originPoint)
Project the given point to the X-Z plan, by setting the Y value to 0.

Parameters:
originPoint - the point to project
Returns:
a new point, with the same X and Z values, but Y set to 0.


Copyright © 2010. All Rights Reserved.