public class Plane extends Object
| Modifier and Type | Field and Description |
|---|---|
(package private) float |
c
Constant for faster projection and intersection
|
private Vec3f |
normal
Normalized
|
private Vec3f |
point |
| Constructor and Description |
|---|
Plane()
Default constructor initializes normal to (0, 1, 0) and point to
(0, 0, 0)
|
Plane(Vec3f normal,
Vec3f point)
Sets all parameters of plane.
|
| Modifier and Type | Method and Description |
|---|---|
Vec3f |
getNormal()
Normal is normalized internally, so normal is not
necessarily equal to
plane.setNormal(normal);
plane.getNormal(); |
Vec3f |
getPoint() |
boolean |
intersectRay(Vec3f rayStart,
Vec3f rayDirection,
IntersectionPoint intPt)
Intersect a ray with the plane.
|
void |
projectPoint(Vec3f pt,
Vec3f projPt)
Project a point onto the plane
|
private void |
recalc() |
void |
setNormal(Vec3f normal)
Setter does some work to maintain internal caches.
|
void |
setPoint(Vec3f point)
Setter does some work to maintain internal caches
|
private Vec3f normal
private Vec3f point
float c
public Plane()
public void setNormal(Vec3f normal)
public Vec3f getNormal()
plane.setNormal(normal);
plane.getNormal();public void setPoint(Vec3f point)
public Vec3f getPoint()
public boolean intersectRay(Vec3f rayStart, Vec3f rayDirection, IntersectionPoint intPt)
private void recalc()
Copyright © 2007–2017 Gephi Consortium. All rights reserved.