public class Line extends Object
| Modifier and Type | Field and Description |
|---|---|
private Vec3f |
alongVec
For computing projections along line
|
private Vec3f |
direction
Normalized
|
private Vec3f |
point |
| Constructor and Description |
|---|
Line()
Default constructor initializes line to point (0, 0, 0) and
direction (1, 0, 0)
|
Line(Vec3f direction,
Vec3f point)
Line goes in direction direction through the point
point.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
closestPointToRay(Vec3f rayStart,
Vec3f rayDirection,
Vec3f closestPoint)
Find closest point on this line to the given ray, specified by
start point and direction.
|
Vec3f |
getDirection()
Direction is normalized internally, so direction is not
necessarily equal to
plane.setDirection(direction);
plane.getDirection(); |
Vec3f |
getPoint() |
void |
projectPoint(Vec3f pt,
Vec3f projPt)
Project a point onto the line
|
private void |
recalc() |
void |
setDirection(Vec3f direction)
Setter does some work to maintain internal caches.
|
void |
setPoint(Vec3f point)
Setter does some work to maintain internal caches.
|
private Vec3f point
private Vec3f direction
private Vec3f alongVec
public Line()
public void setDirection(Vec3f direction)
public Vec3f getDirection()
plane.setDirection(direction);
plane.getDirection();public void setPoint(Vec3f point)
public Vec3f getPoint()
public boolean closestPointToRay(Vec3f rayStart, Vec3f rayDirection, Vec3f closestPoint)
private void recalc()
Copyright © 2007–2017 Gephi Consortium. All rights reserved.