PickContext Custom - Window Selection


I’m trying to do some custom picking and I was able to create a custom PickContext that works fine with the mouse down event. My problem is when I want to do a Window selection (Crossing or normal) in the MouseUp event. I set the PickStyle to that values but seems the PickContext object does not work and keeps working as a “Point” Pickstyle. I also set the PickTransform and I call UpdateClippingPlanes.

            PickContext myContext = new PickContext()
                View = e.View,
                PickMode = PickMode.Shaded, //It doesn't matter what I put here
                PickStyle = PickStyle.CrossingPick,
                PickGroupsEnabled = true,
                PickLine = frustumLine, //e.View.ActiveViewport.GetFrustumLine(e.ViewportPoint.X, e.ViewportPoint.Y, out frustumLine);
                SubObjectSelectionEnabled = false

Anyone knows how to set the the PickContext to make it work in window selection mode?


I got the answer, you can call the method e.View.ActiveViewport.GetPickTransform(Rectangle) instead of calling it with a point and it works :slight_smile:. Hope this helps others.


1 Like