Dense grass + sparse dark tufts on a mesh. Caller owns GrassField*; GPU Mesh / Shader / Texture are owned by Graphics. 更多...
#include <Grass.h>
类 | |
| struct | BakeParams |
Public 成员函数 | |
| GrassField (Graphics *gfx) | |
| ~GrassField ()=default | |
| GrassField (const GrassField &)=delete | |
| GrassField & | operator= (const GrassField &)=delete |
| void | bake (const float *posXYZ, const float *nrmXYZ, int vertexCount, const uint32_t *indices, int indexCount, const BakeParams ¶ms) |
| void | bakePlane (float sizeX, float sizeZ, int segX, int segZ) |
| void | bakePlane (float sizeX, float sizeZ, int segX, int segZ, const BakeParams ¶ms) |
| void | update (float dt) |
| void | setTime (float seconds) |
| float | getTime () const |
| void | setFrameDuration (float seconds) |
| float | getFrameDuration () const |
| void | draw (const glm::mat4 &model) |
| void | draw () |
| Mesh * | getDenseMesh () const |
| Mesh * | getSparseMesh () const |
| Shader * | getShader () const |
| Texture * | getAtlas () const |
| int | getDenseCount () const |
| int | getSparseCount () const |
详细描述
Dense grass + sparse dark tufts on a mesh. Caller owns GrassField*; GPU Mesh / Shader / Texture are owned by Graphics.
构造及析构函数说明
◆ GrassField() [1/2]
◆ ~GrassField()
|
default |
◆ GrassField() [2/2]
|
delete |
成员函数说明
◆ bake()
| void eve::graphics::GrassField::bake | ( | const float * | posXYZ, |
| const float * | nrmXYZ, | ||
| int | vertexCount, | ||
| const uint32_t * | indices, | ||
| int | indexCount, | ||
| const BakeParams & | params | ||
| ) |
引用了 eve::graphics::GrassField::BakeParams::atlasFrameH, eve::graphics::GrassField::BakeParams::atlasFrames, eve::graphics::GrassField::BakeParams::atlasFrameW, eve::graphics::grass::bindAtlasLayout(), eve::graphics::grass::bindDefaults(), eve::graphics::grass::buildBillboards(), eve::graphics::grass::createShader(), eve::graphics::grass::createSwayAtlas(), eve::graphics::grass::createSwayAtlasFromFiles(), eve::graphics::GrassField::BakeParams::denseRadius, eve::graphics::GrassField::BakeParams::grassAtlasFiles, eve::graphics::GrassField::BakeParams::height, layout, eve::graphics::GrassField::BakeParams::leafAtlasFiles, eve::graphics::GrassField::BakeParams::maxDense, eve::graphics::grass::SampleParams::maxPoints, eve::graphics::GrassField::BakeParams::maxSparse, eve::graphics::grass::SampleParams::minSlopeDot, eve::graphics::GrassField::BakeParams::minSlopeDot, eve::graphics::Graphics::newMeshFromArrays(), eve::graphics::grass::SampleParams::radius, eve::graphics::grass::samplePoisson(), eve::graphics::grass::SampleParams::seed, eve::graphics::GrassField::BakeParams::seed, eve::graphics::Shader::sendFloat(), eve::graphics::GrassField::BakeParams::sparseRadius , 以及 eve::graphics::GrassField::BakeParams::width.
被这些函数引用 bakePlane().
◆ bakePlane() [1/2]
| void eve::graphics::GrassField::bakePlane | ( | float | sizeX, |
| float | sizeZ, | ||
| int | segX, | ||
| int | segZ | ||
| ) |
◆ bakePlane() [2/2]
| void eve::graphics::GrassField::bakePlane | ( | float | sizeX, |
| float | sizeZ, | ||
| int | segX, | ||
| int | segZ, | ||
| const BakeParams & | params | ||
| ) |
◆ draw() [1/2]
◆ draw() [2/2]
| void eve::graphics::GrassField::draw | ( | const glm::mat4 & | model | ) |
◆ getAtlas()
◆ getDenseCount()
◆ getDenseMesh()
◆ getFrameDuration()
◆ getShader()
◆ getSparseCount()
◆ getSparseMesh()
◆ getTime()
◆ operator=()
|
delete |
◆ setFrameDuration()
| void eve::graphics::GrassField::setFrameDuration | ( | float | seconds | ) |
◆ setTime()
| void eve::graphics::GrassField::setTime | ( | float | seconds | ) |
◆ update()
| void eve::graphics::GrassField::update | ( | float | dt | ) |
该类的文档由以下文件生成: