CCVector3 result from the ItemPicked signal
Posted: Tue Mar 21, 2017 11:24 am
hi Daniel,
I used this event to get the x,y,z location of a point that I picked on a point cloud. My assumption was this CCVector3 gives me the x,y and z location of the point closest to my picking location. But is it instead giving the location of the clicked position on the screen?
So would using the below method be safe to get nearest point in the cloud?
I used this event to get the x,y,z location of a point that I picked on a point cloud. My assumption was this CCVector3 gives me the x,y and z location of the point closest to my picking location. But is it instead giving the location of the clicked position on the screen?
Code: Select all
SIGNAL(itemPicked(ccHObject*, unsigned, int, int, const CCVector3&)
Code: Select all
bool pointPicking( const CCVector2d& clickPos,
const ccGLCameraParameters& camera,
int& nearestPointIndex,
double& nearestSquareDist,
double pickWidth = 2.0,
double pickHeight = 2.0,
bool autoComputeOctree = false);