You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.1 KiB
46 lines
1.1 KiB
//
|
|
// Created by dtouch on 23-5-23.
|
|
//
|
|
|
|
#ifndef RENDERSDF_ROD_GENERATE_CUH
|
|
#define RENDERSDF_ROD_GENERATE_CUH
|
|
|
|
#include "cuda_runtime.h"
|
|
#include "rod.h"
|
|
#include "Eigen/Eigen"
|
|
#include "unsupported/Eigen/CXX11/Tensor"
|
|
#include "pybind11/pybind11.h"
|
|
#include "pybind11/numpy.h"
|
|
|
|
namespace py = pybind11;
|
|
|
|
#ifdef _MSC_VER
|
|
#define DLL_EXPORT __declspec( dllexport )
|
|
#else
|
|
#define DLL_EXPORT
|
|
#endif
|
|
|
|
__global__
|
|
void g_rod_generate(const RodCrystal *rodCrystal, cudaPitchedPtr sdf, const cudaExtent* extent, const Eigen::Vector3f *sampleMin,
|
|
const Eigen::Vector3f *sampleMax, int radius);
|
|
|
|
extern "C" DLL_EXPORT __host__ float*
|
|
h_rod_generate(const RodCrystal &rodCrystal, const Eigen::Vector3i &sampleCnt, const Eigen::Vector3f &sampleMin,
|
|
const Eigen::Vector3f &sampleMax, float radius);
|
|
|
|
// return structure for ctypes in python
|
|
typedef struct sdfStruct {
|
|
// float *sdf;
|
|
int *sampleCnt;
|
|
int x;
|
|
} sdfStruct, *sdfStructPtr;
|
|
|
|
//extern "C" DLL_EXPORT sdfStruct*
|
|
py::array_t<float> generate(int sampleX, int sampleY, int sampleZ, float halfSampleRegion);
|
|
|
|
class rod_generate {
|
|
|
|
};
|
|
|
|
|
|
#endif //RENDERSDF_ROD_GENERATE_CUH
|
|
|