E3DViewer::SetPickedPointCallBack

Sets a callback function that will be called when a new E3DPoint is picked.

Namespace: Euresys::Open_eVision_23_12::Easy3D

[C++]

void SetPickedPointCallBack(
   void* pickedPointCallBack,
   void* context,
   bool callCallBackWhenPointNotFound
)

Parameters

pickedPointCallBack

A pointer to a function that will be called when a new E3DPoint is picked.

context

Some context information that will be given in argument to the callback pickedPointCallBack function.

callCallBackWhenPointNotFound

Set to true to call the callback function even if there is not point picked. Default: false.

Remarks

The function pointer should be of type: void CallBackFunction(void* context, bool pickedPointFound, float pX, float pY, float pZ, int x, int y)
Where context is the context parameter that was given in argument, pickedPointFound is set to false if a there were no point close enough to the picking ray (true otherwise), pX, pY, pZ are the coordinates of the point that was picked, x and y are the position of the mouse in the window.

E3DViewer.SetPickedPointCallBack

Sets a callback function that will be called when a new E3DPoint is picked.

Namespace: Euresys.Open_eVision_23_12.Easy3D

[C#]

void SetPickedPointCallBack(
   IntPtr pickedPointCallBack,
   IntPtr context,
   bool callCallBackWhenPointNotFound
)

Parameters

pickedPointCallBack

A pointer to a function that will be called when a new E3DPoint is picked.

context

Some context information that will be given in argument to the callback pickedPointCallBack function.

callCallBackWhenPointNotFound

Set to true to call the callback function even if there is not point picked. Default: false.

Remarks

The function pointer should be of type: delegate void CallBackDelegate(IntPtr context, bool pickedPointFound, float pX, float pY, float pZ, int x, int y).
To obtain an IntPtr of the function, use:
using System.Runtime.InteropServices;,
delegate void CallBackDelegate(IntPtr context, bool pointFound, float pX, float pY, float pZ, int x, int y);
void MyCallBackFunction(IntPtr context, bool pointFound, float pX, float pY, float pZ, int x, int y) {...}
Marshal.GetFunctionPointerForDelegate(new CallBackDelegate(MyCallBackFunction)).
Where context is the context parameter that was given in argument, pickedPointFound is set to false if a there were no point close enough to the picking ray (true otherwise), pX, pY, pZ are the coordinates of the point that was picked, x and y are the position of the mouse in the window.