from __future__ import annotations
import meshsdk.trimpy
from meshsdk.trimpy import func_bool_from_float
from meshsdk.trimpy import func_tl_expected_void_std_string_from_VoxelsVolumeMinMax_Vector_float_Id_VoxelTag_int
from meshsdk.trimpy import func_tl_expected_void_std_string_from_std_vector_float_Vector3_int_int
from meshsdk.trimpy import int_output
from meshsdk.trimpy import std_vector_MeshIntersectionResult
from meshsdk.trimpy import std_vector_MeshProjectionResult
from meshsdk.trimpy import std_vector_MeshTriPoint
from meshsdk.trimpy import std_vector_PointsProjectionResult
from meshsdk.trimpy import std_vector_SkyPatch
from meshsdk.trimpy import std_vector_Vector3_float
from meshsdk.trimpy import std_vector_Vector3_float as std_vector_Vector3f
from meshsdk.trimpy import std_vector_float
import typing
__all__: list[str] = ['ComputeToolDistance', 'FastWindingNumber', 'PointsProjector', 'PointsToMeshProjector', 'computeDistanceMap', 'computeDistanceMapHeapBytes', 'computeSkyViewFactor', 'distanceMapFromContours', 'distanceMapFromContoursHeapBytes', 'findProjectionOnPoints', 'findProjectionOnPointsHeapBytes', 'findSkyRays', 'func_bool_from_float', 'func_tl_expected_void_std_string_from_VoxelsVolumeMinMax_Vector_float_Id_VoxelTag_int', 'func_tl_expected_void_std_string_from_std_vector_float_Vector3_int_int', 'getCudaAvailableMemory', 'getCudaSafeMemoryLimit', 'int_output', 'isCudaAvailable', 'loadMRCudaDll', 'maxBufferSize', 'maxBufferSizeAlignedByBlock', 'negatePicture', 'pointsToDistanceVolume', 'pointsToDistanceVolumeByParts', 'std_vector_MeshIntersectionResult', 'std_vector_MeshProjectionResult', 'std_vector_MeshTriPoint', 'std_vector_PointsProjectionResult', 'std_vector_SkyPatch', 'std_vector_Vector3_float', 'std_vector_Vector3f', 'std_vector_float']
class ComputeToolDistance(meshsdk.trimpy.IComputeToolDistance):
    """
    Generated from:  MR::Cuda::ComputeToolDistance
    
    CUDA implementation of tool distance computation
    """
    def __init__(self) -> None:
        ...
    def computeToolDistance(self, output: meshsdk.trimpy.std_vector_float, dims: meshsdk.trimpy.Vector3i, voxelSize: float, origin: meshsdk.trimpy.Vector3f, padding: float) -> None:
        ...
    @typing.overload
    def prepare(self, dims: meshsdk.trimpy.Vector3i, toolpath: meshsdk.trimpy.Polyline3, toolSpec: meshsdk.trimpy.EndMillTool) -> meshsdk.trimpy.Vector3i:
        ...
    @typing.overload
    def prepare(self, dims: meshsdk.trimpy.Vector3i, toolpath: meshsdk.trimpy.Polyline3, toolProfile: meshsdk.trimpy.Polyline2) -> meshsdk.trimpy.Vector3i:
        ...
class FastWindingNumber(meshsdk.trimpy.IFastWindingNumber, meshsdk.trimpy.IFastWindingNumberByParts):
    """
    Generated from:  MR::Cuda::FastWindingNumber
    
    the class for fast approximate computation of winding number for a mesh (using its AABB tree)
    """
    @staticmethod
    @typing.overload
    def __init__(*args, **kwargs) -> None:
        ...
    @typing.overload
    def __init__(self, mesh: meshsdk.trimpy.Mesh) -> None:
        """
        constructs this from AABB tree of given mesh;
        """
    @typing.overload
    def __init__(self, arg0: FastWindingNumber) -> None:
        """
        Implicit copy constructor.
        """
    def calcFromGrid(self, res: meshsdk.trimpy.std_vector_float, dims: meshsdk.trimpy.Vector3i, gridToMeshXf: meshsdk.trimpy.AffineXf3f, beta: float, cb: meshsdk.trimpy.func_bool_from_float) -> None:
        ...
    def calcFromGridByParts(self, resFunc: meshsdk.trimpy.func_tl_expected_void_std_string_from_std_vector_float_Vector3_int_int, dims: meshsdk.trimpy.Vector3i, gridToMeshXf: meshsdk.trimpy.AffineXf3f, beta: float, layerOverlap: int, cb: meshsdk.trimpy.func_bool_from_float) -> None:
        """
        see methods' descriptions in IFastWindingNumberByParts
        """
    def calcFromGridWithDistances(self, res: meshsdk.trimpy.std_vector_float, dims: meshsdk.trimpy.Vector3i, gridToMeshXf: meshsdk.trimpy.AffineXf3f, options: meshsdk.trimpy.DistanceToMeshOptions, cb: meshsdk.trimpy.func_bool_from_float) -> None:
        ...
    def calcFromGridWithDistancesByParts(self, resFunc: meshsdk.trimpy.func_tl_expected_void_std_string_from_std_vector_float_Vector3_int_int, dims: meshsdk.trimpy.Vector3i, gridToMeshXf: meshsdk.trimpy.AffineXf3f, options: meshsdk.trimpy.DistanceToMeshOptions, layerOverlap: int, cb: meshsdk.trimpy.func_bool_from_float) -> None:
        ...
    def calcFromVector(self, res: meshsdk.trimpy.std_vector_float, points: meshsdk.trimpy.std_vector_Vector3_float, beta: float, skipFace: meshsdk.trimpy.FaceId, cb: meshsdk.trimpy.func_bool_from_float) -> None:
        """
        see methods' descriptions in IFastWindingNumber
        """
    def calcSelfIntersections(self, res: meshsdk.trimpy.FaceBitSet, beta: float, cb: meshsdk.trimpy.func_bool_from_float) -> None:
        ...
class PointsProjector(meshsdk.trimpy.IPointsProjector):
    """
    Generated from:  MR::Cuda::PointsProjector
    
    CUDA-backed implementation of IPointsProjector
    """
    @staticmethod
    @typing.overload
    def __init__(*args, **kwargs) -> None:
        ...
    @staticmethod
    @typing.overload
    def operator(*args, **kwargs) -> PointsProjector:
        ...
    @staticmethod
    @typing.overload
    def operator(*args, **kwargs) -> PointsProjector:
        ...
    @typing.overload
    def __init__(self) -> None:
        ...
    @typing.overload
    def __init__(self, arg0: PointsProjector) -> None:
        """
        Implicit copy constructor.
        """
    def findProjections(self, results: meshsdk.trimpy.std_vector_PointsProjectionResult, points: meshsdk.trimpy.std_vector_Vector3_float, settings: meshsdk.trimpy.FindProjectionOnPointsSettings) -> None:
        """
        computes the closest points on point cloud to given points
        """
    def projectionsHeapBytes(self, numProjections: int) -> int:
        """
        Returns amount of additional memory needed to compute projections
        """
    def setPointCloud(self, pointCloud: meshsdk.trimpy.PointCloud) -> None:
        """
        sets the reference point cloud
        """
class PointsToMeshProjector(meshsdk.trimpy.IPointsToMeshProjector):
    """
    Generated from:  MR::Cuda::PointsToMeshProjector
    
    Computes the closest point on mesh to each of given points on GPU. It caches data that necessary for computing
    """
    @staticmethod
    @typing.overload
    def __init__(*args, **kwargs) -> None:
        ...
    @staticmethod
    @typing.overload
    def operator(*args, **kwargs) -> PointsToMeshProjector:
        ...
    @staticmethod
    @typing.overload
    def operator(*args, **kwargs) -> PointsToMeshProjector:
        ...
    @typing.overload
    def __init__(self) -> None:
        ...
    @typing.overload
    def __init__(self, arg0: PointsToMeshProjector) -> None:
        """
        Implicit copy constructor.
        """
    def findProjections(self, res: meshsdk.trimpy.std_vector_MeshProjectionResult, points: meshsdk.trimpy.std_vector_Vector3_float, objXf: meshsdk.trimpy.AffineXf3f, refObjXf: meshsdk.trimpy.AffineXf3f, upDistLimitSq: float, loDistLimitSq: float) -> None:
        """
        <summary>
        Computes the closest point on mesh to each of given points
        </summary>
        <param name="res">vector pf projections</param>
        <param name="points">vector of points to project</param>
        <param name="objXf">transform applied to points</param>
        <param name="refObjXf">transform applied to referencing mesh</param>
        <param name="upDistLimitSq">maximal squared distance from point to mesh</param>
        <param name="loDistLimitSq">minimal squared distance from point to mesh</param>
        """
    def projectionsHeapBytes(self, numProjections: int) -> int:
        """
        Returns amount of additional memory needed to compute projections
        """
    def updateMeshData(self, mesh: meshsdk.trimpy.Mesh) -> None:
        """
        update all data related to the referencing mesh
        """
def computeDistanceMap(mesh: meshsdk.trimpy.Mesh, params: meshsdk.trimpy.MeshToDistanceMapParams, cb: meshsdk.trimpy.func_bool_from_float = '{}', outSamples: meshsdk.trimpy.std_vector_MeshTriPoint = None) -> meshsdk.trimpy.DistanceMap:
    """
    computes distance (height) map for given projection parameters
    using float-precision for finding ray-mesh intersections, which is faster but less reliable
    """
def computeDistanceMapHeapBytes(mesh: meshsdk.trimpy.Mesh, params: meshsdk.trimpy.MeshToDistanceMapParams, needOutSamples: bool = False) -> int:
    """
    Computes memory consumption of computeDistanceMap function
    """
def computeSkyViewFactor(terrain: meshsdk.trimpy.Mesh, samples: meshsdk.trimpy.VertCoords, validSamples: meshsdk.trimpy.VertBitSet, skyPatches: meshsdk.trimpy.std_vector_SkyPatch, outSkyRays: meshsdk.trimpy.BitSet = None, outIntersections: meshsdk.trimpy.std_vector_MeshIntersectionResult = None) -> meshsdk.trimpy.VertScalars:
    """
    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;
    \\param 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
    \\param outIntersections - optional output vector of MeshIntersectionResult for every valid sample point
    """
def distanceMapFromContours(polyline: meshsdk.trimpy.Polyline2, params: meshsdk.trimpy.ContourToDistanceMapParams) -> meshsdk.trimpy.DistanceMap:
    """
    Computes distance of 2d contours according to ContourToDistanceMapParams (works correctly only when withSign==false)
    """
def distanceMapFromContoursHeapBytes(polyline: meshsdk.trimpy.Polyline2, params: meshsdk.trimpy.ContourToDistanceMapParams) -> int:
    """
    Computes memory consumption of distanceMapFromContours function
    """
def findProjectionOnPoints(pointCloud: meshsdk.trimpy.PointCloud, points: meshsdk.trimpy.std_vector_Vector3_float, settings: meshsdk.trimpy.FindProjectionOnPointsSettings = '{}') -> meshsdk.trimpy.std_vector_PointsProjectionResult:
    """
    computes the closest points on point cloud to given points
    """
def findProjectionOnPointsHeapBytes(pointCloud: meshsdk.trimpy.PointCloud, pointsCount: int) -> int:
    """
    returns the minimal amount of free GPU memory required for \\ref MR::Cuda::findProjectionOnPoints
    """
def findSkyRays(terrain: meshsdk.trimpy.Mesh, samples: meshsdk.trimpy.VertCoords, validSamples: meshsdk.trimpy.VertBitSet, skyPatches: meshsdk.trimpy.std_vector_SkyPatch, outIntersections: meshsdk.trimpy.std_vector_MeshIntersectionResult = None) -> meshsdk.trimpy.BitSet:
    """
    In each valid sample point tests the rays from that point in the sky;
    \\return 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
    \\param outIntersections - optional output vector of MeshIntersectionResult for every valid sample point
    """
def getCudaAvailableMemory() -> int:
    """
    Returns available GPU memory in bytes
    """
def getCudaSafeMemoryLimit() -> int:
    """
    Returns maximum safe amount of free GPU memory that will be used for dynamic-sized buffers
    """
def isCudaAvailable(driverVersion: meshsdk.trimpy.int_output = None, runtimeVersion: meshsdk.trimpy.int_output = None, computeMajor: meshsdk.trimpy.int_output = None, computeMinor: meshsdk.trimpy.int_output = None) -> bool:
    """
    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
    """
def loadMRCudaDll() -> None:
    """
    call this function to load MRCuda shared library
    """
def maxBufferSize(availableBytes: int, elementCount: int, elementBytes: int) -> int:
    """
    Returns maximum buffer size in elements that can be allocated with given memory limit
    """
@typing.overload
def maxBufferSizeAlignedByBlock(availableBytes: int, blockDims: meshsdk.trimpy.Vector2i, elementBytes: int) -> int:
    """
    Returns maximum buffer size in elements that can be allocated with given memory limit
    The size is aligned to the block dimensions
    """
@typing.overload
def maxBufferSizeAlignedByBlock(availableBytes: int, blockDims: meshsdk.trimpy.Vector3i, elementBytes: int) -> int:
    ...
def negatePicture(image: meshsdk.trimpy.Image) -> None:
    """
    This function inverts Color value (255 - value in each channel except alpha) 
    """
def pointsToDistanceVolume(cloud: meshsdk.trimpy.PointCloud, params: meshsdk.trimpy.PointsToDistanceVolumeParams) -> meshsdk.trimpy.SimpleVolumeMinMax:
    """
    makes SimpleVolume filled with signed distances to points with normals
    """
def pointsToDistanceVolumeByParts(cloud: meshsdk.trimpy.PointCloud, params: meshsdk.trimpy.PointsToDistanceVolumeParams, addPart: meshsdk.trimpy.func_tl_expected_void_std_string_from_VoxelsVolumeMinMax_Vector_float_Id_VoxelTag_int, layerOverlap: int) -> None:
    """
    makes SimpleVolume filled with signed distances to points with normals
    populate the volume by parts to the given callback
    """
