pack method

  1. @override
int pack(
  1. Builder fbBuilder
)
override

Serialize the object using the given builder, returning the offset.

Implementation

@override
int pack(fb.Builder fbBuilder) {
  final int? jointsOffset = joints == null ? null
      : fbBuilder.writeListInt32(joints!);
  int? inverseBindMatricesOffset;
  if (inverseBindMatrices != null) {
    for (var e in inverseBindMatrices!) { e.pack(fbBuilder); }
    inverseBindMatricesOffset = fbBuilder.endStructVector(inverseBindMatrices!.length);
  }
  fbBuilder.startTable(3);
  fbBuilder.addOffset(0, jointsOffset);
  fbBuilder.addOffset(1, inverseBindMatricesOffset);
  fbBuilder.addInt32(2, skeleton);
  return fbBuilder.endTable();
}