DepthMode at PreDrawObject in Conduit


#1

Hi,

I do not understand the behavior of DepthMode very well.
I am trying to know when an object that is in the conduit and on the pad is moving and when it is released. I thought that when it was moving the DepthMode had the value of AlwaysInFront but in some computers it does not go that way and in the Rhino 6 that I am testing either.
Any ideas about it?

This is my code:

protected override void PreDrawObject( DrawObjectEventArgs e )
{
                if ( e.Display.DepthMode == DepthMode.AlwaysInFront )
                {
                        if ( e.RhinoObject.Id.Equals( myGUID ) )
                        {
                         ......
                        }
                } else if ( !Rhino.Input.RhinoGet.InGet( RhinoDoc.ActiveDoc ) )
                {
                      //Code when the movement has finished
                }
}

Thanks
Eliseo


(Dale Fugier) #2

Hi @Eliseo,

It isn’t clear to me what you are doing or want to do. But dynamic drawing always happens in a conduit’s overlay channel. There is no depth buffering in the overlay channel.

– Dale


#3

Hi Dale,

My purpose is to show interpolation points and allow the user to move them. During this movement I want the interpolation curve to be recalculated and the result to be shown.
I changed:

if ( e.Display.DepthMode == DepthMode.AlwaysInFront )

by:

if ( !e.Display.ModelTransformIsIdentity )

but I don’t know if is a correct way to do this.

Thanks


(Dale Fugier) #4

This has nothing to do with “depth mode”.

– Dale


#5

But then how can I capture the movement of a point in the conduit? Is this possible?

Eliseo