载入中...
搜索中...
未找到
DestructionFx.cpp
浏览该文件的文档.
21eve::Result<GeometryCollectionRenderer*> DestructionFx::createRenderer(GeometryCollectionInstance* instance) {
24 eve::DiagnosticCode::InvalidArgument, "DestructionFx.createRenderer requires an instance", "instance"));
25 return eve::Result<GeometryCollectionRenderer*>::success(new GeometryCollectionRenderer(instance));
62 std::function<GeometryCollectionRenderer*()>([]() -> GeometryCollectionRenderer* { return nullptr; }), true);
64 renderer.addFunc("clearInstance", [](GeometryCollectionRenderer* self) { self->setInstance(nullptr); });
72 renderer.addFunc("setGroupExteriorColor", [vm = table.getHandle()](GeometryCollectionRenderer* self, int groupId,
133 script::makeOwnedSquirrelInstance<GeometryCollectionRenderer>(vm, std::move(created).takeValue());
The single Squirrel projection for common Result, Status and Value.
Explicit Value/Owned/Borrowed semantics at the Squirrel boundary.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
const Status & status() const noexcept
Inspect the structured operation status.
Definition Result.h:521
static Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
const Diagnostic * primaryDiagnostic() const noexcept
First diagnostic, or null when no diagnostic was supplied.
Definition Status.h:141
Definition Graphics.h:134
Optional presentation satellite for geometry-collection destruction.
Definition DestructionFx.h:18
eve::Result< GeometryCollectionRenderer * > createRenderer(GeometryCollectionInstance *instance)
Create a presentation renderer that borrows an instance.
Definition DestructionFx.cpp:21
GeometryCollectionRenderer * createRendererScript(GeometryCollectionInstance *instance)
Script facade that projects creation failure to an exception. @ownership Script VM owns the returned ...
Definition DestructionFx.cpp:32
eve::Result< std::unique_ptr< GeometryCollectionRenderer > > createAnimationRenderer()
Create an owning renderer for physics-independent animation playback.
Definition DestructionFx.cpp:28
Runtime owner of bone state, connection strain, and PhysicsLink bindings.
Definition GeometryCollectionInstance.h:70
Presentation bridge for a borrowed geometry-collection instance.
Definition GeometryCollectionRenderer.h:41
void setInteriorColor(float r, float g, float b, float a)
Cut-face RGBA; also used for Detached legacy box bones.
Definition GeometryCollectionRenderer.cpp:90
void setExteriorColor(float r, float g, float b, float a)
Exterior-face RGBA; also used for Attached legacy box bones.
Definition GeometryCollectionRenderer.cpp:82
eve::Result< void > draw(graphics::Graphics *graphics)
Synchronize caches and draw all bones into the current 3D frame.
Definition GeometryCollectionRenderer.cpp:189
void setSleepColor(float r, float g, float b, float a)
Sleeping-batch RGBA.
Definition GeometryCollectionRenderer.cpp:98
void setInstance(GeometryCollectionInstance *instance)
Replace the borrowed instance; null disables drawing. @ownership Does not take ownership of instance....
Definition GeometryCollectionRenderer.cpp:77
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:540
@ InvalidArgument