예제 #1
0
 ///<summary>Slice the ProceduralMeshComponent (including simple convex collision) using a plane.</summary>
 ///<remarks>
 ///Optionally create 'cap' geometry.
 ///@param  InProcMesh                              ProceduralMeshComponent to slice
 ///@param  PlanePosition                   Point on the plane to use for slicing, in world space
 ///@param  PlaneNormal                             Normal of plane used for slicing. Geometry on the positive side of the plane will be kept.
 ///@param  bCreateOtherHalf                If true, an additional ProceduralMeshComponent (OutOtherHalfProcMesh) will be created using the other half of the sliced geometry
 ///@param  OutOtherHalfProcMesh    If bCreateOtherHalf is set, this is the new component created. Its owner will be the same as the supplied InProcMesh.
 ///@param  CapOption                               If and how to create 'cap' geometry on the slicing plane
 ///@param  CapMaterial                             If creating a new section for the cap, assign this material to that section
 ///</remarks>
 public static ProceduralMeshComponent SliceProceduralMesh(ProceduralMeshComponent InProcMesh, Vector PlanePosition, Vector PlaneNormal, bool bCreateOtherHalf, EProcMeshSliceCapOption CapOption, MaterialInterface CapMaterial) =>
 KismetProceduralMeshLibrary_methods.SliceProceduralMesh_method.Invoke(InProcMesh, PlanePosition, PlaneNormal, bCreateOtherHalf, CapOption, CapMaterial);
            internal static unsafe ProceduralMeshComponent Invoke(ProceduralMeshComponent InProcMesh, Vector PlanePosition, Vector PlaneNormal, bool bCreateOtherHalf, EProcMeshSliceCapOption CapOption, MaterialInterface CapMaterial)
            {
                long *p = stackalloc long[] { 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L };
                byte *b = (byte *)p;

                *((IntPtr *)(b + 0))  = InProcMesh;
                *((Vector *)(b + 8))  = PlanePosition;
                *((Vector *)(b + 20)) = PlaneNormal;
                *((bool *)(b + 32))   = bCreateOtherHalf;
                *(b + 48)             = (byte)CapOption;
                *((IntPtr *)(b + 56)) = CapMaterial;
                Main.GetProcessEvent(KismetProceduralMeshLibrary.DefaultObject, SliceProceduralMesh_ptr, new IntPtr(p));;
                return(*((IntPtr *)(b + 40)));
            }
        }