swh:1:snp:e19303b5caf9fb6e591d1d985f0767020645282b
Raw File
Tip revision: 48149026cf02a353ab8abee7a8420d4196a9ad38 authored by Moye-mio on 06 April 2024, 16:36:01 UTC
Update README.md
Tip revision: 4814902
HeightMapGenerator.h
#pragma once

namespace core {

template <typename T>
using ptr = std::shared_ptr<T>;
using uint = std::uint32_t;

class CHeightMap;
class CHeightMapGenerator {
public:

	ptr<CHeightMap> generate(const PC_t::Ptr vCloud, uint vResX, uint vResY, bool vIsDetailed = false);
	ptr<CHeightMap> generate(const std::vector<vec3f>& vPts, uint vResX, uint vResY, bool vIsDetailed = false);
	void dumpProjCoor(std::vector<vec2i>& voProjCoor) { voProjCoor = m_ProjCoor; }

private:
	ptr<CHeightMap> __generate(const std::vector<vec3f>& vPts, uint vResX, uint vResY, bool vIsDetailed = false);
	vec2i __mapUV2Pixel(const vec2f& vUV, uint vResX, uint vResY);

private:
	std::vector<vec2i> m_ProjCoor;
};

}
back to top