Kanzi Graphics Engine
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros
kzu_pick.h File Reference

Color buffer based picking utility. More...

Functions

kzsError kzuPickCreate (const struct KzcMemoryManager *memoryManager, const struct KzuEngine *engine, kzUint width, kzUint height, struct KzuPick **out_pick)
 Create a new picking context. More...
 
kzsError kzuPickInitialize (struct KzuPick *pick, const struct KzuUIDomain *uiDomain)
 Initialized the pick by loading the picking material from the CoreAssets. More...
 
kzsError kzuPickDelete (struct KzuPick *pick)
 Delete a picking context. More...
 
void kzuPickEnableDoubleSided (struct KzuPick *pick, kzBool enable)
 Enables or disables double-sided picking. More...
 
kzBool kzuPickIsDoubleSided (const struct KzuPick *pick)
 Returns KZ_TRUE if double-sided picking is enabled, KZ_FALSE otherwise. More...
 
kzsError kzuPick (struct KzuPick *pick, const struct KzuEngine *engine, const struct KzuTransformedScene *transformedScene, kzUint windowWidth, kzUint windowHeight, kzUint positionX, kzUint positionY, struct KzuObjectNode **out_node, kzUint *out_meshCluster)
 Perform object picking using a color id buffer. More...
 
kzsError kzuPickWithScreen (struct KzuPick *pick, const struct KzuEngine *engine, const struct KzuTransformedScene *transformedScene, kzUint positionX, kzUint positionY, struct KzuObjectNode **out_node, kzUint *out_meshCluster)
 As kzuPick, but get pickable area size from current engine screen. More...
 
kzsError kzuPickMaterial (struct KzuPick *pick, const struct KzuEngine *engine, const struct KzuTransformedScene *transformedScene, kzUint windowWidth, kzUint windowHeight, kzUint positionX, kzUint positionY, struct KzuMaterial **out_material)
 Perform material picking using a material id buffer. More...
 

Detailed Description

Color buffer based picking utility.

Copyright 2008-2019 by Rightware. All rights reserved.

Function Documentation

kzsError kzuPickCreate ( const struct KzcMemoryManager memoryManager,
const struct KzuEngine engine,
kzUint  width,
kzUint  height,
struct KzuPick **  out_pick 
)

Create a new picking context.

kzsError kzuPickInitialize ( struct KzuPick pick,
const struct KzuUIDomain uiDomain 
)

Initialized the pick by loading the picking material from the CoreAssets.

kzsError kzuPickDelete ( struct KzuPick pick)

Delete a picking context.

void kzuPickEnableDoubleSided ( struct KzuPick pick,
kzBool  enable 
)

Enables or disables double-sided picking.

Doublesided picking picks both front and back faces of geometry.

kzBool kzuPickIsDoubleSided ( const struct KzuPick pick)

Returns KZ_TRUE if double-sided picking is enabled, KZ_FALSE otherwise.

kzsError kzuPick ( struct KzuPick pick,
const struct KzuEngine engine,
const struct KzuTransformedScene transformedScene,
kzUint  windowWidth,
kzUint  windowHeight,
kzUint  positionX,
kzUint  positionY,
struct KzuObjectNode **  out_node,
kzUint out_meshCluster 
)

Perform object picking using a color id buffer.

kzsError kzuPickWithScreen ( struct KzuPick pick,
const struct KzuEngine engine,
const struct KzuTransformedScene transformedScene,
kzUint  positionX,
kzUint  positionY,
struct KzuObjectNode **  out_node,
kzUint out_meshCluster 
)

As kzuPick, but get pickable area size from current engine screen.

kzsError kzuPickMaterial ( struct KzuPick pick,
const struct KzuEngine engine,
const struct KzuTransformedScene transformedScene,
kzUint  windowWidth,
kzUint  windowHeight,
kzUint  positionX,
kzUint  positionY,
struct KzuMaterial **  out_material 
)

Perform material picking using a material id buffer.