iicm.utils3d
Class Ray

java.lang.Object
  extended by iicm.utils3d.Ray

public class Ray
extends java.lang.Object

Ray - definition of a ray for picking purposes. Copyright (c) 1997 IICM

Version:
1.0, changed: 5 May 97
Author:
Michael Pichler

Field Summary
 Vec3f direction_
           
 float far_
           
 float near_
           
 Vec3f start_
           
 
Constructor Summary
Ray(float[] start, float[] direction, float near, float far)
          create a ray, given by start point, direction vector, and near/far picking ranges
Ray(float sx, float sy, float sz, float dx, float dy, float dz, float near, float far)
          create a ray, given by start coordinates, direction, and near/far ranges
Ray(Vec3f start, Vec3f direction, float near, float far)
          create a ray (as above).
 
Method Summary
 Vec3f at(float t)
          tell where the ray is at a specific value of t.
 java.lang.String toString()
          string rep (for debugging)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

start_

public Vec3f start_

direction_

public Vec3f direction_

near_

public float near_

far_

public float far_
Constructor Detail

Ray

public Ray(float[] start,
           float[] direction,
           float near,
           float far)
create a ray, given by start point, direction vector, and near/far picking ranges


Ray

public Ray(Vec3f start,
           Vec3f direction,
           float near,
           float far)
create a ray (as above). Vec3f references taken over by Ray class


Ray

public Ray(float sx,
           float sy,
           float sz,
           float dx,
           float dy,
           float dz,
           float near,
           float far)
create a ray, given by start coordinates, direction, and near/far ranges

Method Detail

at

public Vec3f at(float t)
tell where the ray is at a specific value of t. ray equation: start + t * direction

See Also:
Vec3f.rayat(float[], float, float[])

toString

public java.lang.String toString()
string rep (for debugging)

Overrides:
toString in class java.lang.Object