载入中...
搜索中...
未找到
GeometryCollectionRenderer.cpp
浏览该文件的文档.
19void appendBox(std::vector<float>& positions, std::vector<float>& normals, std::vector<float>& uv,
50 glm::mat4 model = glm::translate(glm::mat4(1.f), glm::vec3(bone.worldX, bone.worldY, bone.worldZ));
64GeometryCollectionRenderer::GeometryCollectionRenderer(GeometryCollectionInstance* instance) noexcept
136 eve::DiagnosticCode::InvalidArgument, "geometry-collection renderer has no instance", "instance"));
164 eve::DiagnosticCode::Failed, "geometry-collection sleep batch mesh allocation failed", "mesh"));
173 eve::DiagnosticCode::InvalidArgument, "geometry-collection draw requires Graphics", "graphics"));
176 eve::DiagnosticCode::InvalidArgument, "geometry-collection renderer has no instance", "instance"));
200 const graphics::Color tint(detached ? interiorR_ : exteriorR_, detached ? interiorG_ : exteriorG_,
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={}, DiagnosticDetails details={}, std::string source={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.h:125
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:175
Definition Graphics.h:125
virtual bool releaseMesh(Mesh *mesh)
Eagerly releases a mesh created by this Graphics.
Definition Graphics.h:927
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).
Runtime owner of bone state, connection strain, and PhysicsLink bindings.
Definition GeometryCollectionInstance.h:96
std::uint64_t sleepBatchRevision() const noexcept
Monotonic revision bumped when any bone enters Sleeping (for batch rebuild).
Definition GeometryCollectionInstance.h:169
bool hasLiveWorld() const noexcept
Whether the owning world handle still resolves.
Definition GeometryCollectionInstance.cpp:106
int boneCount() const noexcept
Definition GeometryCollectionInstance.h:141
eve::Result< BonePresentation > bonePresentation(int boneIndex) const
Sample one bone's world pose and proxy extents for presentation.
Definition GeometryCollectionInstance.cpp:424
void setInteriorColor(float r, float g, float b, float a)
Interior RGBA for Detached bones (broken-face stand-in).
Definition GeometryCollectionRenderer.cpp:82
void setExteriorColor(float r, float g, float b, float a)
Exterior RGBA for Attached bones.
Definition GeometryCollectionRenderer.cpp:74
eve::Result< void > draw(graphics::Graphics *graphics)
Synchronize caches and draw all bones into the current 3D frame.
Definition GeometryCollectionRenderer.cpp:168
GeometryCollectionRenderer(GeometryCollectionInstance *instance) noexcept
Construct a renderer that borrows an instance.
Definition GeometryCollectionRenderer.cpp:64
void setSleepColor(float r, float g, float b, float a)
Sleeping-batch RGBA.
Definition GeometryCollectionRenderer.cpp:90
void setInstance(GeometryCollectionInstance *instance)
Replace the borrowed instance; null disables drawing. @ownership Does not take ownership of instance....
Definition GeometryCollectionRenderer.cpp:69
~GeometryCollectionRenderer()
Geometry collection renderer.
Definition GeometryCollectionRenderer.cpp:67
eve::Color Color
RGBA color used by every graphics draw call. Lives inside eve::graphics so including a graphics heade...
Definition Color.h:13
@ Detached
@ Sleeping
@ InvalidArgument
@ Failed
@ StaleHandle