MCPcopy Create free account
hub / github.com/Tencent/tgfx / SerializeMatrixImpl

Function SerializeMatrixImpl

src/inspect/serialization/MatrixSerialization.cpp:23–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21
22namespace tgfx {
23static void SerializeMatrixImpl(flexbuffers::Builder& fbb, const Matrix* matrix) {
24 float buffer[6] = {0.0f};
25 matrix->get6(buffer);
26 std::string key = "";
27 for (int i = 0; i < 6; i++) {
28 key = "[" + std::to_string(i) + "]";
29 SerializeUtils::SetFlexBufferMap(fbb, key.c_str(), buffer[i]);
30 }
31}
32
33std::shared_ptr<Data> MatrixSerialization::Serialize(const Matrix* matrix) {
34 DEBUG_ASSERT(matrix != nullptr)

Callers 1

SerializeMethod · 0.85

Calls 2

get6Method · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected