public class PickRay extends Object
Constructor and Description |
---|
PickRay() |
PickRay(double x,
double y,
double z,
double nearClip,
double farClip) |
PickRay(Vec3d origin,
Vec3d direction,
double nearClip,
double farClip) |
Modifier and Type | Method and Description |
---|---|
static PickRay |
computeParallelPickRay(double x,
double y,
double viewHeight,
Affine3D cameraTransform,
double nearClip,
double farClip,
PickRay pickRay) |
static PickRay |
computePerspectivePickRay(double x,
double y,
boolean fixedEye,
double viewWidth,
double viewHeight,
double fieldOfViewRadians,
boolean verticalFieldOfView,
Affine3D cameraTransform,
double nearClip,
double farClip,
PickRay pickRay) |
PickRay |
copy() |
double |
distance(Vec3d iPnt) |
Vec3d |
getDirection(Vec3d rv) |
Vec3d |
getDirectionNoClone() |
double |
getFarClip() |
double |
getNearClip() |
Vec3d |
getOrigin(Vec3d rv) |
Vec3d |
getOriginNoClone() |
void |
inverseTransform(BaseTransform t) |
PickRay |
project(BaseTransform inversetx,
boolean perspective,
Vec3d tmpvec,
Point2D ret) |
Point2D |
projectToZeroPlane(BaseTransform inversetx,
boolean perspective,
Vec3d tmpvec,
Point2D ret)
Project the ray through the specified (inverted) transform and
onto the Z=0 plane of the resulting coordinate system.
|
void |
set(double x,
double y,
double z,
double nearClip,
double farClip) |
void |
set(Vec3d origin,
Vec3d direction,
double nearClip,
double farClip) |
void |
setDirection(double x,
double y,
double z)
Sets the direction of the pick ray.
|
void |
setDirection(Vec3d direction)
Sets the direction vector of the pick ray.
|
void |
setOrigin(double x,
double y,
double z)
Sets the origin of the pick ray in world coordinates.
|
void |
setOrigin(Vec3d origin)
Sets the origin of the pick ray in world coordinates.
|
void |
setPickRay(PickRay other) |
String |
toString() |
void |
transform(BaseTransform t) |
public PickRay()
public PickRay(double x, double y, double z, double nearClip, double farClip)
public static PickRay computePerspectivePickRay(double x, double y, boolean fixedEye, double viewWidth, double viewHeight, double fieldOfViewRadians, boolean verticalFieldOfView, Affine3D cameraTransform, double nearClip, double farClip, PickRay pickRay)
public static PickRay computeParallelPickRay(double x, double y, double viewHeight, Affine3D cameraTransform, double nearClip, double farClip, PickRay pickRay)
public final void set(double x, double y, double z, double nearClip, double farClip)
public void setPickRay(PickRay other)
public PickRay copy()
public void setOrigin(Vec3d origin)
origin
- the origin (in world coordinates).public void setOrigin(double x, double y, double z)
x
- the origin X coordinatey
- the origin Y coordinatez
- the origin Z coordinatepublic Vec3d getOriginNoClone()
public void setDirection(Vec3d direction)
direction
- the direction vectorpublic void setDirection(double x, double y, double z)
x
- the direction X magnitudey
- the direction Y magnitudez
- the direction Z magnitudepublic Vec3d getDirectionNoClone()
public double getNearClip()
public double getFarClip()
public double distance(Vec3d iPnt)
public Point2D projectToZeroPlane(BaseTransform inversetx, boolean perspective, Vec3d tmpvec, Point2D ret)
inversetx
- the inverse of the model transform into which the
ray is to be projectedperspective
- true if the projection is happening in perspectivetmpvec
- a temporary Vec3d
object for internal use
(may be null)ret
- a Point2D
object for storing the return value,
or null if a new object should be returned.public void transform(BaseTransform t)
public void inverseTransform(BaseTransform t) throws NoninvertibleTransformException
NoninvertibleTransformException
public PickRay project(BaseTransform inversetx, boolean perspective, Vec3d tmpvec, Point2D ret)
Copyright © 2020. All rights reserved.