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; }
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()); }
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); }
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); }