Hitting points from tool plugin's MouseInput()

On 28/08/2013 at 11:45, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R14 
Platform:   Windows  ;   
Language(s) :     C++  ;

Hi Folks,

I've been on this one for a few days now, but apart from a few topics laying around that touch on the area, I'm not really finding anything concrete.

Where (or with what functions) does one go about identifying what points have been hit from a tool plugin inside the MouseInput()? The best I came up with seems to only work with polys (the GeRayCollider). Am I meant to then test what points are attached to this polygon!?

Where do I need to be looking to be able to write my own point hit/selection code - one with a visible only option? There's TestPoint() and TestPointZ() in BaseView... Am I meant to work the collider's result in with these? Or is this best done with something else like ViewportPixel()??

I don't necessarily need code - I don't mind having a go trying to do that myself - but a bit of clarification on the right direction here would be swell!



On 28/08/2013 at 13:06, xxxxxxxx wrote:

Interesting timing.
Because I literally just uploaded an example of using the GeRayCollider in a tool plugin to my site:https://sites.google.com/site/scottayersmedia/plugins

Hope it helps you out,

On 29/08/2013 at 07:28, xxxxxxxx wrote:

Thanks Scott,

I hadn't really thought of iterating through the vector of points in each 'mouse down' loop. Seems to be reasonably quick too.

I've got enough to go on from here now! Thanks,


On 25/09/2013 at 05:30, xxxxxxxx wrote:

Hi All,

sorry to bring up an ageing topic, but how do you go about implementing a "Visible Only" type point selection when using the GeRayCollider? I've read a few topics on here that mention it, but none that I can find that actually describe how to do it.

I've got the GeRayCollider etc all working, and it's getting the correct points and so on, but how do you tell (in code) whether a point is visible or not?

I came across Bool TestPointZ(const Vector& p) in BaseDraw(). Is this what others use? Or is this still done with the GeRayCollider itself?