Skip to content

Commit

Permalink
a bit more sync
Browse files Browse the repository at this point in the history
  • Loading branch information
fraguada committed Dec 2, 2024
1 parent 002e24b commit 401ea56
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
10 changes: 10 additions & 0 deletions src/dotnet/opennurbs/opennurbs_viewport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,16 @@ public bool ChangeToParallelProjection(bool symmetricFrustum)
return UnsafeNativeMethods.ON_Viewport_ChangeToParallelProjection(ptr_this, symmetricFrustum);
}

/// <summary>
/// When a viewport is set to Parallel Reflected projection, the geometry on the ceiling is shown as if it is mirrored to the floor below.
/// </summary>
/// <returns>true if successful</returns>
public bool ChangeToParallelReflectedProjection()
{
IntPtr ptr_this = NonConstPointer();
return UnsafeNativeMethods.ON_Viewport_ChangeToParallelReflectedProjection(ptr_this);
}

/// <summary>
/// Use this function to change projections of valid viewports
/// from parallel to perspective. It will make common additional
Expand Down
4 changes: 2 additions & 2 deletions src/dotnet/rhino/rhinosdkobject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ public bool HasCustomRenderMeshes(MeshType mt, ViewportInfo vp, ref RenderMeshPr

uint f = (uint)flags;

f |= 8 /*RenderMeshProvider.Flags.IsDocumentObject*/;
f |= 8 /*RenderMeshProvider.Flags.IsDocumentObject*/;

IntPtr ptrViewport = (vp != null) ? vp.ConstPointer() : IntPtr.Zero;

Expand Down Expand Up @@ -2307,7 +2307,7 @@ public RenderMeshes RenderMeshes(MeshType mt, ViewportInfo vp, List<DocObjects.I
if (Document == null)
return null;

var primitives = new RenderMeshes(Document, Id, Guid.Empty, 0);
var primitives = new RenderMeshes(Document, Id, Guid.Empty, 0, (uint)flags);

uint f = (uint)flags;

Expand Down
3 changes: 1 addition & 2 deletions src/librhino3dm_native/on_math.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ RH_C_FUNCTION double ON_Integrate_1D(void* func, void* context, ON_INTERVAL_STRU
return 0.0;
}


RH_C_FUNCTION double ON_Integrate_1D_Curve(void* func, void* context, const ON_Curve* curve, double relative_tolerance, double absolute_tolerance, double* error_bound)
{
if (curve && func && context)
Expand Down Expand Up @@ -105,4 +104,4 @@ RH_C_FUNCTION double ON_Integrate_2D_Surface(void* func, void* context, const ON
// DALE LEAR thinks you should return ON_DBL_QNAN if the input is bogus
return 0.0;
}
#endif
#endif

0 comments on commit 401ea56

Please sign in to comment.