MeshLib Java Docs
Loading...
Searching...
No Matches
meshlib.cuda.Functions Class Reference

Static Public Member Functions

static meshlib.cuda.DeviceInfo getDeviceInfo ()
static boolean isCudaAvailable (meshlib.int_output driverVersion, meshlib.int_output runtimeVersion, meshlib.int_output computeMajor, meshlib.int_output computeMinor)
static long getCudaAvailableMemory ()
static long getCudaSafeMemoryLimit ()
static long maxBufferSize (long availableBytes, long elementCount, long elementBytes)
static long maxBufferSizeAlignedByBlock (long availableBytes, meshlib.Vector2i blockDims, long elementBytes)
static long maxBufferSizeAlignedByBlock (long availableBytes, meshlib.Vector3i blockDims, long elementBytes)
static meshlib.DistanceMap distanceMapFromContours (meshlib.Polyline2 polyline, meshlib.ContourToDistanceMapParams params)
static long distanceMapFromContoursHeapBytes (meshlib.Polyline2 polyline, meshlib.ContourToDistanceMapParams params)
static meshlib.DistanceMap computeDistanceMap (meshlib.Mesh mesh, meshlib.MeshToDistanceMapParams params, meshlib.std_function_bool_from_float cb, meshlib.std_vector_MR_MeshTriPoint outSamples)
static long computeDistanceMapHeapBytes (meshlib.Mesh mesh, meshlib.MeshToDistanceMapParams params, java.lang.Boolean needOutSamples)
static meshlib.std_vector_MR_PointsProjectionResult findProjectionOnPoints (meshlib.PointCloud pointCloud, meshlib.VertCoords points, meshlib.FindProjectionOnPointsSettings settings)
static long findProjectionOnPointsHeapBytes (meshlib.PointCloud pointCloud, long pointsCount)
static meshlib.SimpleVolumeMinMax pointsToDistanceVolume (meshlib.PointCloud cloud, meshlib.PointsToDistanceVolumeParams params)
static void pointsToDistanceVolumeByParts (meshlib.PointCloud cloud, meshlib.PointsToDistanceVolumeParams params, meshlib.std_function_expected_void_std_string_from_const_MR_SimpleVolumeMinMax_ref_int addPart, int layerOverlap)
static long pointsToDistanceVolumeMemory (meshlib.PointCloud cloud, meshlib.Vector3i dims, meshlib.VertCoords ptNormals)
static meshlib.VertScalars computeSkyViewFactor (meshlib.Mesh terrain, meshlib.VertCoords samples, meshlib.VertBitSet validSamples, meshlib.std_vector_MR_SkyPatch skyPatches, meshlib.BitSet outSkyRays, meshlib.std_vector_MR_MeshIntersectionResult outIntersections)
static meshlib.BitSet findSkyRays (meshlib.Mesh terrain, meshlib.VertCoords samples, meshlib.VertBitSet validSamples, meshlib.std_vector_MR_SkyPatch skyPatches, meshlib.std_vector_MR_MeshIntersectionResult outIntersections)
static void negatePicture (meshlib.Image image)
static void loadMRCudaDll ()

Detailed Description

The free functions of this namespace.

Member Function Documentation

◆ computeDistanceMap()

meshlib.DistanceMap meshlib.cuda.Functions.computeDistanceMap ( meshlib.Mesh mesh,
meshlib.MeshToDistanceMapParams params,
meshlib.std_function_bool_from_float cb,
meshlib.std_vector_MR_MeshTriPoint outSamples )
static

computes distance (height) map for given projection parameters using float-precision for finding ray-mesh intersections, which is faster but less reliable Generated from function MR::Cuda::computeDistanceMap.

Calls MR_Cuda_computeDistanceMap(). The C++ function returns expected<MR::DistanceMap, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ computeDistanceMapHeapBytes()

long meshlib.cuda.Functions.computeDistanceMapHeapBytes ( meshlib.Mesh mesh,
meshlib.MeshToDistanceMapParams params,
java.lang.Boolean needOutSamples )
static

Computes memory consumption of computeDistanceMap function Generated from function MR::Cuda::computeDistanceMapHeapBytes.

Calls MR_Cuda_computeDistanceMapHeapBytes().

◆ computeSkyViewFactor()

meshlib.VertScalars meshlib.cuda.Functions.computeSkyViewFactor ( meshlib.Mesh terrain,
meshlib.VertCoords samples,
meshlib.VertBitSet validSamples,
meshlib.std_vector_MR_SkyPatch skyPatches,
meshlib.BitSet outSkyRays,
meshlib.std_vector_MR_MeshIntersectionResult outIntersections )
static

computes relative radiation in each valid sample point by emitting rays from that point in the sky: the radiation is 1.0f if all rays reach the sky not hitting the terrain; the radiation is 0.0f if all rays do not reach the sky because they are intercepted by the terrain;

Parameters
outSkyRays- optional output bitset where for every valid sample i its rays are stored at indices [i*numPatches; (i+1)*numPatches), 0s for occluded rays (hitting the terrain) and 1s for the ones which don't hit anything and reach the sky
outIntersections- optional output vector of MeshIntersectionResult for every valid sample point Generated from function MR::Cuda::computeSkyViewFactor.

Calls MR_Cuda_computeSkyViewFactor().

◆ distanceMapFromContours()

meshlib.DistanceMap meshlib.cuda.Functions.distanceMapFromContours ( meshlib.Polyline2 polyline,
meshlib.ContourToDistanceMapParams params )
static

Computes distance of 2d contours according to ContourToDistanceMapParams (works correctly only when withSign==false) Generated from function MR::Cuda::distanceMapFromContours.

Calls MR_Cuda_distanceMapFromContours(). The C++ function returns expected<MR::DistanceMap, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ distanceMapFromContoursHeapBytes()

long meshlib.cuda.Functions.distanceMapFromContoursHeapBytes ( meshlib.Polyline2 polyline,
meshlib.ContourToDistanceMapParams params )
static

Computes memory consumption of distanceMapFromContours function Generated from function MR::Cuda::distanceMapFromContoursHeapBytes.

Calls MR_Cuda_distanceMapFromContoursHeapBytes().

◆ findProjectionOnPoints()

meshlib.std_vector_MR_PointsProjectionResult meshlib.cuda.Functions.findProjectionOnPoints ( meshlib.PointCloud pointCloud,
meshlib.VertCoords points,
meshlib.FindProjectionOnPointsSettings settings )
static

computes the closest points on point cloud to given points Generated from function MR::Cuda::findProjectionOnPoints.

Calls MR_Cuda_findProjectionOnPoints(). The C++ function returns expected<std::vector<MR::PointsProjectionResult>, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ findProjectionOnPointsHeapBytes()

long meshlib.cuda.Functions.findProjectionOnPointsHeapBytes ( meshlib.PointCloud pointCloud,
long pointsCount )
static

returns the minimal amount of free GPU memory required for MR::Cuda::findProjectionOnPoints Generated from function MR::Cuda::findProjectionOnPointsHeapBytes.

Calls MR_Cuda_findProjectionOnPointsHeapBytes().

◆ findSkyRays()

meshlib.BitSet meshlib.cuda.Functions.findSkyRays ( meshlib.Mesh terrain,
meshlib.VertCoords samples,
meshlib.VertBitSet validSamples,
meshlib.std_vector_MR_SkyPatch skyPatches,
meshlib.std_vector_MR_MeshIntersectionResult outIntersections )
static

In each valid sample point tests the rays from that point in the sky;

Returns
bitset where for every valid sample i its rays are stored at indices [i*numPatches; (i+1)*numPatches), 0s for occluded rays (hitting the terrain) and 1s for the ones which don't hit anything and reach the sky
Parameters
outIntersections- optional output vector of MeshIntersectionResult for every valid sample point Generated from function MR::Cuda::findSkyRays.

Calls MR_Cuda_findSkyRays().

◆ getCudaAvailableMemory()

long meshlib.cuda.Functions.getCudaAvailableMemory ( )
static

Returns available GPU memory in bytes Generated from function MR::Cuda::getCudaAvailableMemory.

Calls MR_Cuda_getCudaAvailableMemory().

◆ getCudaSafeMemoryLimit()

long meshlib.cuda.Functions.getCudaSafeMemoryLimit ( )
static

Returns maximum safe amount of free GPU memory that will be used for dynamic-sized buffers Generated from function MR::Cuda::getCudaSafeMemoryLimit.

Calls MR_Cuda_getCudaSafeMemoryLimit().

◆ getDeviceInfo()

meshlib.cuda.DeviceInfo meshlib.cuda.Functions.getDeviceInfo ( )
static

Returns an error if CUDA is not available Generated from function MR::Cuda::getDeviceInfo.

Calls MR_Cuda_getDeviceInfo(). The C++ function returns expected<MR::Cuda::DeviceInfo, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ isCudaAvailable()

boolean meshlib.cuda.Functions.isCudaAvailable ( meshlib.int_output driverVersion,
meshlib.int_output runtimeVersion,
meshlib.int_output computeMajor,
meshlib.int_output computeMinor )
static

Returns true if Cuda is present on this GPU optional out maximum driver supported version optional out current runtime version optional out compute capability major version optional out compute capability minor version Generated from function MR::Cuda::isCudaAvailable.

Calls MR_Cuda_isCudaAvailable().

◆ loadMRCudaDll()

void meshlib.cuda.Functions.loadMRCudaDll ( )
static

call this function to load MRCuda shared library Generated from function MR::Cuda::loadMRCudaDll.

Calls MR_Cuda_loadMRCudaDll().

◆ maxBufferSize()

long meshlib.cuda.Functions.maxBufferSize ( long availableBytes,
long elementCount,
long elementBytes )
static

Returns maximum buffer size in elements that can be allocated with given memory limit Generated from function MR::Cuda::maxBufferSize.

Calls MR_Cuda_maxBufferSize().

◆ maxBufferSizeAlignedByBlock() [1/2]

long meshlib.cuda.Functions.maxBufferSizeAlignedByBlock ( long availableBytes,
meshlib.Vector2i blockDims,
long elementBytes )
static

Returns maximum buffer size in elements that can be allocated with given memory limit The size is aligned to the block dimensions Generated from function MR::Cuda::maxBufferSizeAlignedByBlock.

Calls MR_Cuda_maxBufferSizeAlignedByBlock_MR_Vector2i().

◆ maxBufferSizeAlignedByBlock() [2/2]

long meshlib.cuda.Functions.maxBufferSizeAlignedByBlock ( long availableBytes,
meshlib.Vector3i blockDims,
long elementBytes )
static

Generated from function MR::Cuda::maxBufferSizeAlignedByBlock.

Calls MR_Cuda_maxBufferSizeAlignedByBlock_MR_Vector3i().

◆ negatePicture()

void meshlib.cuda.Functions.negatePicture ( meshlib.Image image)
static

This function inverts Color value (255 - value in each channel except alpha) Generated from function MR::Cuda::negatePicture.

Calls MR_Cuda_negatePicture(). The C++ function returns expected<void, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ pointsToDistanceVolume()

meshlib.SimpleVolumeMinMax meshlib.cuda.Functions.pointsToDistanceVolume ( meshlib.PointCloud cloud,
meshlib.PointsToDistanceVolumeParams params )
static

makes SimpleVolume filled with signed distances to points with normals Generated from function MR::Cuda::pointsToDistanceVolume.

Calls MR_Cuda_pointsToDistanceVolume(). The C++ function returns expected<MR::SimpleVolumeMinMax, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ pointsToDistanceVolumeByParts()

void meshlib.cuda.Functions.pointsToDistanceVolumeByParts ( meshlib.PointCloud cloud,
meshlib.PointsToDistanceVolumeParams params,
meshlib.std_function_expected_void_std_string_from_const_MR_SimpleVolumeMinMax_ref_int addPart,
int layerOverlap )
static

makes SimpleVolume filled with signed distances to points with normals populate the volume by parts to the given callback Generated from function MR::Cuda::pointsToDistanceVolumeByParts.

Calls MR_Cuda_pointsToDistanceVolumeByParts(). The C++ function returns expected<void, std::string>: the value is returned and an error is thrown as UnexpectedResultException.

◆ pointsToDistanceVolumeMemory()

long meshlib.cuda.Functions.pointsToDistanceVolumeMemory ( meshlib.PointCloud cloud,
meshlib.Vector3i dims,
meshlib.VertCoords ptNormals )
static

returns the minimal amount of free GPU memory required to build a distance volume with given dimensions Generated from function MR::Cuda::pointsToDistanceVolumeMemory.

Calls MR_Cuda_pointsToDistanceVolumeMemory().


The documentation for this class was generated from the following file: