载入中...
搜索中...
未找到
DeformCaptureBinding.h
浏览该文件的文档.
1#pragma once
7template <class Source>
8ssq::Table appendCapturedDeform(HSQUIRRELVM vm, Source& source, const ssq::Object& recordingObject, float seconds) {
9 if (recordingObject.getType() != ssq::Type::INSTANCE ||
10 recordingObject.getTypeTag() != script::detail::squirrelTypeHash<DeformRecording*>())
13 "expected a live deformation recording", "physics.captureBake")));
15 auto* recording = recordingObject.to<DeformRecording*>();
16 if (!recording)
19 "physics.captureBake")));
20 auto frame = captureDeformFrame(source, seconds);
21 if (!frame) return script::projectStatusResult(vm, frame.status());
22 return script::projectResult(vm, recording->append(std::move(frame).takeValue()));
23}
24} // namespace eve::physics::bake_detail
struct SQVM * HSQUIRRELVM
HSQUIRRELVM vm
Definition ECS.cpp:38
ssq::Object frame
RigidRecording recording
std::string_view source
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.
static Status failure(StatusCode code, Diagnostic diagnostic)
Construct a failed status with one diagnostic.
Definition Status.cpp:28
Bounded owning builder for fixed-topology deformation recordings. @ownership Owns a frozen recipe cop...
ssq::Table appendCapturedDeform(HSQUIRRELVM vm, Source &source, const ssq::Object &recordingObject, float seconds)
Result< DeformFrame > captureDeformFrame(const Cloth3D &source, float seconds)
Copy a complete owning deformation frame; source-owner thread outside stepping. @ownership Borrows so...
ssq::Table projectStatusResult(HSQUIRRELVM vm, const Status &status)
Project a checked native status that carries no payload.
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.