载入中...
搜索中...
未找到
SoftBody3DGraphics.cpp
浏览该文件的文档.
78 mesh_ = graphics->newMeshFromArrays(positions.data(), normals.data(), uv.data(), vertexCount, indices.data(),
83 graphics->updateMeshVertices(mesh_, positions.data(), normals.data(), uv.data(), vertexCount, nullptr, 0);
85 if (mesh_) graphics->drawMesh(mesh_, glm::mat4(1.f), nullptr, graphics::Color(colorR_, colorG_, colorB_, colorA_));
Definition Graphics.h:125
virtual void drawMesh(Mesh *mesh, const glm::mat4 &model, Texture *texture, const Color &tint)=0
Draw one mesh with model matrix. Requires begin3DFrame() (or an open swapchain pass).
virtual bool updateMeshVertices(Mesh *mesh, const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0
In-place update of a mesh's vertex/index data (CPU -> host-visible VBO). Mirrors bakeMeshMorph: the u...
virtual Mesh * newMeshFromArrays(const float *posXYZ, const float *nrmXYZ, const float *uvST, int vertexCount, const uint32_t *indices, int indexCount)=0
Upload a triangle mesh from packed CPU arrays. Owned by Graphics. posXYZ required (vertexCount*3)....
void draw(graphics::Graphics *graphics)
Update the surface cache and draw it in the current 3D frame.
Definition SoftBody3DGraphics.cpp:29
void setBody(SoftBody3D *body)
Replace the borrowed runtime; null disables drawing.
Definition SoftBody3DGraphics.cpp:15
void setColor(float r, float g, float b, float a)
Set the clamped RGBA presentation color.
Definition SoftBody3DGraphics.cpp:22
Volumetric particle soft body using overlapping shape-matching clusters.
Definition SoftBody3D.h:27
bool isDestroyed() const noexcept
Whether destroy() has disabled this runtime instance.
Definition SoftBody3D.h:169
float getParticleZ(int index) const
Definition SoftBody3D.cpp:228
float getParticleX(int index) const
Definition SoftBody3D.cpp:220
float getParticleY(int index) const
Definition SoftBody3D.cpp:224
eve::Color Color
RGBA color used by every graphics draw call. Lives inside eve::graphics so including a graphics heade...
Definition Color.h:13