MeshLib C Docs
Loading...
Searching...
No Matches
MRCudaSolarRadiation.h File Reference
#include <MRCCuda/exports.h>

Go to the source code of this file.

Functions

MRC_CUDA_API MR_VertScalarsMR_Cuda_computeSkyViewFactor (const MR_Mesh *terrain, const MR_VertCoords *samples, const MR_VertBitSet *validSamples, const MR_std_vector_MR_SkyPatch *skyPatches, MR_BitSet *outSkyRays, MR_std_vector_MR_MeshIntersectionResult *outIntersections)
MRC_CUDA_API MR_BitSetMR_Cuda_findSkyRays (const MR_Mesh *terrain, const MR_VertCoords *samples, const MR_VertBitSet *validSamples, const MR_std_vector_MR_SkyPatch *skyPatches, MR_std_vector_MR_MeshIntersectionResult *outIntersections)

Function Documentation

◆ MR_Cuda_computeSkyViewFactor()

MRC_CUDA_API MR_VertScalars * MR_Cuda_computeSkyViewFactor ( const MR_Mesh * terrain,
const MR_VertCoords * samples,
const MR_VertBitSet * validSamples,
const MR_std_vector_MR_SkyPatch * skyPatches,
MR_BitSet * outSkyRays,
MR_std_vector_MR_MeshIntersectionResult * outIntersections )

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. Parameter terrain can not be null. It is a single object. Parameter samples can not be null. It is a single object. Parameter validSamples can not be null. It is a single object. Parameter skyPatches can not be null. It is a single object. Parameter outSkyRays defaults to a null pointer in C++. Parameter outIntersections defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_VertScalars_Destroy() to free it when you're done using it.

◆ MR_Cuda_findSkyRays()

MRC_CUDA_API MR_BitSet * MR_Cuda_findSkyRays ( const MR_Mesh * terrain,
const MR_VertCoords * samples,
const MR_VertBitSet * validSamples,
const MR_std_vector_MR_SkyPatch * skyPatches,
MR_std_vector_MR_MeshIntersectionResult * outIntersections )

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. Parameter terrain can not be null. It is a single object. Parameter samples can not be null. It is a single object. Parameter validSamples can not be null. It is a single object. Parameter skyPatches can not be null. It is a single object. Parameter outIntersections defaults to a null pointer in C++. Never returns null. Returns an instance allocated on the heap! Must call MR_BitSet_Destroy() to free it when you're done using it.