This reference page is linked to from the following overview topics: Picking, Writing Plug-ins.
ScreenSpacePicker objects are used to translate the user action of.
clicking in the view into a picked point on the surface of a mesh. If you need to control the algorithm by which points are picked, you can override this class in a plug-in, and replace Mudbox's version, which is in the plugin called "HWPicker". To create your own: 1. Write a plug-in that defines your own class derived from ScreenSpacePicker. 2. Delete the existing HWPicker plugin, and copy yours into the plug-in folder. On OSX, this plugin is found in the Mudbox 2010 module, under Contents>MacOS>plugins. On the PC, it is found in the work dir folder, under "plugins"
#include <mesh.h>
Public Member Functions |
|
virtual void | SetFramebufferSize (unsigned int iWidth, unsigned int iHeight) |
This is called by Mudbox to inform the
object of the size of the visible framebuffer. |
|
virtual bool | Pick (const class Camera *pCamera, float fXPosition, float fYPosition, SurfacePoint &sResult) |
Translates the x,y coordinates of a user
mouse-click to a point on surface in the scene. |
virtual void SetFramebufferSize | ( | unsigned int | iWidth, |
unsigned int | iHeight | ||
) | [virtual] |
This is called by Mudbox to inform the object of the size of the visible framebuffer.
[in] | iWidth | The width of the frame buffer in pixels |
[in] | iHeight | The height of the frame buffer in pixels |
virtual bool Pick | ( | const class Camera * | pCamera, |
float | fXPosition, | ||
float | fYPosition, | ||
SurfacePoint & | sResult | ||
) | [virtual] |
Translates the x,y coordinates of a user mouse-click to a point on surface in the scene.
[in] | pCamera | A pointer to the camera that was used to display this view |
[in] | fXPosition | The X position of the point the user clicked (in pixels) |
[in] | fYPosition | The Y position of the point the user clicked (in pixels) |
[out] | sResult | The selected point on the surface |