On 19/12/2014 at 15:50, xxxxxxxx wrote:
Cinema 4D Version: 15,16
Platform: Mac OSX ;
Language(s) : C++ ;
I'm using GetPixelInfoPoint in a tool to get information about vertexes of an object that are inside an area.
The information is returned inside a ViewportPixel structure and the vertex is returned in variable i.
But if the x,y coordinates provided in GetPixelInfoPoint don't match with any vertex of the object, the i variable returns 0.
However, the x,y coordinates could match the vertex number 0 of the object.
How can I know if a value of zero in the i variable means that there is no vertex in that coordinate or if it is reporting vertex number 0?
On 20/12/2014 at 06:29, xxxxxxxx wrote:
Retrieves point information at the pixel position ( x , y ).
| [in]| x| An X coordinate within the viewport. Must be 0 <= x < w , where w is the width given to Init().
The retrieved point information, or nullptr if no information could be retrieved. The ViewportSelect instance owns the pointed viewport pixel..
check against nullptr not 0
On 20/12/2014 at 12:59, xxxxxxxx wrote:
Thank you, Mohamed.
I made it work now