public class PlaneUV extends Object
| Modifier and Type | Field and Description |
|---|---|
private Vec3f |
normal
Normalized
|
private Vec3f |
origin |
private Vec3f |
uAxis |
private Vec3f |
vAxis |
| Constructor and Description |
|---|
PlaneUV()
Default constructor initializes normal to (0, 1, 0), origin to
(0, 0, 0), U axis to (1, 0, 0) and V axis to (0, 0, -1).
|
PlaneUV(Vec3f normal,
Vec3f origin)
Takes normal vector and a point which the plane goes through
(which becomes the plane's "origin").
|
PlaneUV(Vec3f normal,
Vec3f origin,
Vec3f uAxis)
Takes normal vector, point which plane goes through, and the "u"
axis in the plane.
|
PlaneUV(Vec3f normal,
Vec3f origin,
Vec3f uAxis,
Vec3f vAxis)
Takes normal vector, point which plane goes through, and both
the u and v axes.
|
| Modifier and Type | Method and Description |
|---|---|
Vec3f |
getNormal()
Normal, U and V axes are normalized internally, so, for example,
normal is not necessarily equal to
plane.setNormal(normal); plane.getNormal(); |
Vec3f |
getOrigin() |
Vec3f |
getUAxis() |
Vec3f |
getVAxis() |
boolean |
intersectRay(Vec3f rayStart,
Vec3f rayDirection,
IntersectionPoint intPt,
Vec2f uvCoords)
Intersect a ray with this plane, outputting not only the 3D
intersection point but also the U, V coordinates of the
intersection.
|
void |
projectPoint(Vec3f point,
Vec3f projPt,
Vec2f uvCoords)
Project a point onto the plane
|
private void |
setEverything(Vec3f normal,
Vec3f origin,
Vec3f uAxis,
Vec3f vAxis) |
void |
setNormal(Vec3f normal)
This version sets the normal vector and generates new U and V
axes.
|
void |
setNormalAndU(Vec3f normal,
Vec3f uAxis)
This version computes the V axis from (normal cross U).
|
void |
setNormalAndUV(Vec3f normal,
Vec3f uAxis,
Vec3f vAxis)
Normal, U and V axes must be orthogonal and satisfy U cross V =
normal, do not need to be unit length but must not be the zero
vector.
|
void |
setOrigin(Vec3f origin)
Set the origin, through which this plane goes and with respect
to which U and V coordinates are computed
|
private Vec3f origin
private Vec3f normal
private Vec3f uAxis
private Vec3f vAxis
public PlaneUV()
public PlaneUV(Vec3f normal, Vec3f origin)
public PlaneUV(Vec3f normal, Vec3f origin, Vec3f uAxis)
public void setOrigin(Vec3f origin)
public Vec3f getOrigin()
public void setNormalAndUV(Vec3f normal, Vec3f uAxis, Vec3f vAxis)
public void setNormal(Vec3f normal)
public void setNormalAndU(Vec3f normal, Vec3f uAxis)
public Vec3f getNormal()
plane.setNormal(normal); plane.getNormal();public Vec3f getUAxis()
public Vec3f getVAxis()
public void projectPoint(Vec3f point, Vec3f projPt, Vec2f uvCoords)
public boolean intersectRay(Vec3f rayStart, Vec3f rayDirection, IntersectionPoint intPt, Vec2f uvCoords)
Copyright © 2007–2017 Gephi Consortium. All rights reserved.