|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectsmithers.java3d.Line3D
public class Line3D
Represents a line in 3-dimensional space.
| Constructor Summary | |
|---|---|
Line3D()
Constructs the x-axis. |
|
Line3D(float[] base,
float[] vec)
Constructs a line through the given point in the given direction. |
|
Line3D(float dx,
float dy,
float dz)
Constructs a line through the origin in the given direction. |
|
Line3D(float x0,
float y0,
float z0,
float dx,
float dy,
float dz)
Constructs a line through the given point in the given direction. |
|
| Method Summary | |
|---|---|
float |
distance(float[] p)
Calculates the shortest distance from this line to the given point. |
float[] |
getBase()
Get a point on the line. |
float[] |
getHead()
Get another point on this line. |
float[] |
getVector()
Get the direction in which the line points. |
float[] |
intersectPlane(float[] p,
float[] n)
Calculates the point of intersection of this line with a plane. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Line3D()
public Line3D(float dx,
float dy,
float dz)
dx - the relative change in xdy - the relative change in ydz - the relative change in z
public Line3D(float x0,
float y0,
float z0,
float dx,
float dy,
float dz)
x0 - the x coordinate of the starting pointy0 - the y coordinate of the starting pointz0 - the z coordinate of the starting pointdx - the relative change in xdy - the relative change in ydz - the relative change in z
public Line3D(float[] base,
float[] vec)
base - the starting pointvec - the direction vector| Method Detail |
|---|
public float[] getBase()
public float[] getVector()
public float[] getHead()
getBase().
getBase()public float distance(float[] p)
p - the point
public float[] intersectPlane(float[] p,
float[] n)
p - a point on the planen - the normal to the plane
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||