Exemplo n.º 1
0
        public void ApplyDirtyRegion(Bound2di box)
        {
            INativeObject nobj   = this.As <INativeObject>();
            IntPtr        argPtr = new IntPtr(&box);
            IntPtr        retVal = IntPtr.Zero;

            nobj.InvokeFunction("ApplyDirtyRegion", argPtr, out retVal);
            Dirty = true;
        }
Exemplo n.º 2
0
        public ulong GetSurfaceInstanceId()
        {
            INativeObject nobj   = this.As <INativeObject>();
            IntPtr        retVal = IntPtr.Zero;

            nobj.InvokeFunction("GetHeightMapInstanceId", IntPtr.Zero, out retVal);
            if (retVal == IntPtr.Zero)
            {
                return(0);
            }
            return(*(ulong *)retVal.ToPointer());
        }
Exemplo n.º 3
0
        public void DrawBrush(TerrainBrush brush, Vec2F drawscale, Vec3F posW)
        {
            INativeObject nobj = this.As <INativeObject>();
            DrawBrushArgs arg;

            arg.falloff   = brush.Falloff;
            arg.radius    = (float)brush.Radius;
            arg.posW      = posW;
            arg.drawscale = drawscale;
            IntPtr argPtr = new IntPtr(&arg);
            IntPtr retval;

            nobj.InvokeFunction("DrawBrush", argPtr, out retval);
        }
Exemplo n.º 4
0
        public bool RayPick(Ray3F rayw, out RayPickRetVal retval)
        {
            INativeObject nobj      = this.As <INativeObject>();
            IntPtr        retvalPtr = IntPtr.Zero;
            IntPtr        rayptr    = new IntPtr(&rayw);

            nobj.InvokeFunction("RayPick", rayptr, out retvalPtr);
            if (retvalPtr != IntPtr.Zero)
            {
                retval = *(RayPickRetVal *)retvalPtr;
            }
            else
            {
                retval = new RayPickRetVal();
            }

            return(retval.picked);
        }