Ray picking utility. More...
Namespaces | |
kanzi | |
Functions | |
KANZI_API kzsError | kzuRayPick (const kanzi::Renderer3D *renderer, const struct KzcVector2 *limits, const kanzi::Scene *scene, kanzi::Camera *cameraNode, kzInt positionX, kzInt positionY, kzFloat *out_distance, kanzi::Node **out_objectNode, struct KzuTransformedObjectNode **out_transformedNode, struct KzcVector3 *out_offsetFromOrigin, struct KzcRay *out_ray) |
Finds ObjectNode positioned in 3d space on a ray shot from point on near clip plane at viewport x,y to the direction of viewport x,y on far clip plane. More... | |
KANZI_API kzsError | kzuRayPickFromGraphicsOutput (const kanzi::Renderer3D *renderer, const kanzi::GraphicsOutput &graphicsOutput, const kanzi::Scene *scene, kanzi::Camera *transformedCameraNode, kzInt positionX, kzInt positionY, kzFloat *out_distance, kanzi::Node **out_objectNode, struct KzuTransformedObjectNode **out_transformedNode, struct KzcVector3 *out_offsetFromOrigin, struct KzcRay *out_ray) |
As kzuRayPick, but take the limits from a graphics output. More... | |
KANZI_API kanzi::NodeSharedPtr | kzuInputHitTest (const struct KzcVector2 *limits, kanzi::Scene *scene, kanzi::Camera *camera, kzInt positionX, kzInt positionY, struct KzcRay *out_ray, kzFloat *out_distance) |
Input hit testing. More... | |
KANZI_API kzsError | kzuRayPickCalculateRay (kzInt pointerX, kzInt pointerY, const struct KzcVector2 *limits, kanzi::Camera *cameraNode, struct KzcRay *out_ray) |
Calculates a ray in world space from active window and given pointer coordinates. More... | |
KANZI_API kzsError | kzuRayPickCalculateRayFromGraphicsOutput (kzInt pointerX, kzInt pointerY, const kanzi::GraphicsOutput &graphicsOutput, kanzi::Camera *camera, struct KzcRay *out_ray) |
As kzuRayPickCalculateRay, but take limits from a graphics output. More... | |
Ray picking utility.
Copyright 2008-2017 by Rightware. All rights reserved.
KANZI_API kzsError kzuRayPick | ( | const kanzi::Renderer3D * | renderer, |
const struct KzcVector2 * | limits, | ||
const kanzi::Scene * | scene, | ||
kanzi::Camera * | cameraNode, | ||
kzInt | positionX, | ||
kzInt | positionY, | ||
kzFloat * | out_distance, | ||
kanzi::Node ** | out_objectNode, | ||
struct KzuTransformedObjectNode ** | out_transformedNode, | ||
struct KzcVector3 * | out_offsetFromOrigin, | ||
struct KzcRay * | out_ray | ||
) |
Finds ObjectNode positioned in 3d space on a ray shot from point on near clip plane at viewport x,y to the direction of viewport x,y on far clip plane.
After the call: If object was hit:
If object was not hit
source | Object source used for picking. It can be used to invalidate parts of scene from picking. |
out_transformedNode | Transformed node of the hit object. Can be KZ_NULL |
KANZI_API kzsError kzuRayPickFromGraphicsOutput | ( | const kanzi::Renderer3D * | renderer, |
const kanzi::GraphicsOutput & | graphicsOutput, | ||
const kanzi::Scene * | scene, | ||
kanzi::Camera * | transformedCameraNode, | ||
kzInt | positionX, | ||
kzInt | positionY, | ||
kzFloat * | out_distance, | ||
kanzi::Node ** | out_objectNode, | ||
struct KzuTransformedObjectNode ** | out_transformedNode, | ||
struct KzcVector3 * | out_offsetFromOrigin, | ||
struct KzcRay * | out_ray | ||
) |
As kzuRayPick, but take the limits from a graphics output.
KANZI_API kanzi::NodeSharedPtr kzuInputHitTest | ( | const struct KzcVector2 * | limits, |
kanzi::Scene * | scene, | ||
kanzi::Camera * | camera, | ||
kzInt | positionX, | ||
kzInt | positionY, | ||
struct KzcRay * | out_ray, | ||
kzFloat * | out_distance | ||
) |
Input hit testing.
Finds the closest visible node that was pointed.
KANZI_API kzsError kzuRayPickCalculateRay | ( | kzInt | pointerX, |
kzInt | pointerY, | ||
const struct KzcVector2 * | limits, | ||
kanzi::Camera * | cameraNode, | ||
struct KzcRay * | out_ray | ||
) |
Calculates a ray in world space from active window and given pointer coordinates.
KANZI_API kzsError kzuRayPickCalculateRayFromGraphicsOutput | ( | kzInt | pointerX, |
kzInt | pointerY, | ||
const kanzi::GraphicsOutput & | graphicsOutput, | ||
kanzi::Camera * | camera, | ||
struct KzcRay * | out_ray | ||
) |
As kzuRayPickCalculateRay, but take limits from a graphics output.