コード例 #1
0
 public static int Tango3DR_extractPreallocatedVoxelGridSegment(
     IntPtr context, ref GridIndex gridIndex, Int32 maxNumVoxels, SignedDistanceVoxel[] voxels)
 {
     return (int)Status.SUCCESS;
 }
コード例 #2
0
        /// <summary>
        /// Extract an array of <c>SignedDistanceVoxel</c> objects.
        /// </summary>
        /// <returns>
        /// Returns Status.SUCCESS if the voxels are fully extracted and stared in the array.  In this case, <c>numVoxels</c>
        /// will say how many voxels are used, the rest of the array is untouched.
        /// 
        /// Returns Status.INVALID if the array length does not exactly equal the number of voxels in a single grid
        /// index.  By default, the number of voxels in a grid index is 16*16*16.
        /// 
        /// Returns Status.INVALID if some other error occurs.
        /// </returns>
        /// <param name="gridIndex">Grid index to extract.</param>
        /// <param name="voxels">
        /// On successful extraction this will get filled out with the signed distance voxels.
        /// </param>
        /// <param name="numVoxels">Number of voxels filled out.</param>
        internal Status ExtractSignedDistanceVoxel(
            GridIndex gridIndex, SignedDistanceVoxel[] voxels, out int numVoxels)
        {
            numVoxels = 0;

            int result = API.Tango3DR_extractPreallocatedVoxelGridSegment(m_context, ref gridIndex, voxels.Length, voxels);
            if (result == (int)Status.SUCCESS)
            {
                // This is the current default number of voxels per grid volume.
                numVoxels = 16 * 16 * 16;
            }

            return (Status)result;
        }
コード例 #3
0
 public static extern int Tango3DR_extractPreallocatedVoxelGridSegment(
     IntPtr context, ref GridIndex gridIndex, Int32 maxNumVoxels, SignedDistanceVoxel[] voxels);