include "Math/Vec3f.fbs";
include "Math/PackedVec3f.fbs";

namespace pkNX.Structures.FlatBuffers.SV.Trinity;
attribute "fs_serializer";

table Sphere {
    Field_00:PackedVec3f;
}

table Box {
    // Just a box. No TrcolFilePath.
    Field_01:PackedVec3f (required);
    Field_02:PackedVec3f (required);
    Field_03:PackedVec3f (required);
}

table Capsule {
    Field_00:PackedVec3f (required);
    Field_01:float;
    Field_02:float;
    Field_03:PackedVec3f (required);
}

table Havok {
    TrcolFilePath:string (required);
    Field_01:PackedVec3f (required);
    Field_02:PackedVec3f (required);
    Field_03:PackedVec3f (required);
}

union CollisionUnion {Sphere, Box, Capsule, Havok}

table CollisionComponent (fs_serializer) {
    Shape:CollisionUnion (required);
    // field 01 is the object ptr for ^
    Field_02:uint; //unknown
    Field_03:byte;
    Field_04:uint; //unknown
    Field_05:uint; //unknown
    Field_06:uint;
    Field_07:uint; //unknown
    Field_08:Vec3f (required);
    Field_09:string (required);
    Field_0A:uint;
    Field_0B:byte;
}

union ComponentUnion {CollisionComponent}

table TrinityComponent (fs_serializer) {
    Component:ComponentUnion (required);
}

root_type TrinityComponent;
