本文整理汇总了C#中Geometry.NonConstPointer方法的典型用法代码示例。如果您正苦于以下问题:C# Geometry.NonConstPointer方法的具体用法?C# Geometry.NonConstPointer怎么用?C# Geometry.NonConstPointer使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geometry
的用法示例。
在下文中一共展示了Geometry.NonConstPointer方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: NativeGeometryNonConstPointer
/// <summary>
/// Returns the underlying non-const ON_Geometry* for a RhinoCommon class. You should
/// only be interested in using this function if you are writing C++ code.
/// </summary>
/// <param name="geometry">A geometry object. This can be null and in such a case <see cref="IntPtr.Zero"/> is returned.</param>
/// <returns>A pointer to the non-const geometry.</returns>
public static IntPtr NativeGeometryNonConstPointer(Geometry.GeometryBase geometry)
{
IntPtr rc = IntPtr.Zero;
if (geometry != null)
rc = geometry.NonConstPointer();
return rc;
}
示例2: Add
/// <summary>
/// Adds a brep to the list.
/// </summary>
/// <param name="brep">A brep to add.</param>
/// <param name="asConst">Whether this brep should be treated as non-modifiable.</param>
public void Add(Geometry.Brep brep, bool asConst)
{
if (null != brep)
{
IntPtr pBrep = brep.ConstPointer();
if (!asConst)
pBrep = brep.NonConstPointer();
IntPtr ptr = NonConstPointer();
UnsafeNativeMethods.ON_BrepArray_Append(ptr, pBrep);
}
}