Skip to content

Spline_Z

widberg edited this page Oct 12, 2023 · 18 revisions

Chum World SPLINE
ImZouna Spline_Z

Wikipedia Spline (Mathematics)
Wikipedia Quadratic Bézier Curves

The Continuity of Splines
The Beauty of Bézier Curves

The spline_z_visualizer.py script is able to visualize Spline_Z and SplineGraph_Z data using Matplotlib.

Collection of quadratic 3D Bezier curve segments

struct SplineSegmentSubdivision {
    /// Endpoints of the line segment
    Vec3f P[2];
    /// Length of the line segment
    /// Distance between P[0] and P[1]
    f32 length;
};

struct SplineSegment {
    /// P and T contain indices into points
    /// Control points { P[0], T[0], T[1], P[1] }
    u16 P[2];
    u16 T[2];
    /// 0x10000000
    /// 0x30000000
    u32 flags;
    std::assert(flags == 0x10000000 || flags == 0x30000000, "flags != 0x10000000,0x30000000");
    /// Length of the spline segment
    f32 length;
    /// Approximation of the spline segment divided into 8 line segments
    /// P[0] of a subdivision will always be equal to P[1] of the previous subdivision if one exists
    SplineSegmentSubdivision spline_segment_subdivisions[8];
};

struct Spline_Z : Object_Z {
    std::assert(type == ObjectType::Spline_Z, "type != ObjectType::Spline_Z");
    DynArray_Z<Vec3f> points;
    DynArray_Z<SplineSegment> spline_segments;
    /// (1, 0, 0, 1)
    Vec4f vec;
    /// Length of the spline
    f32 length;
};

Home
FAQ

For FMTK Users and Mod Developers

Read the Docs

For FMTK Developers

Asobo BigFile Format Specification
Asobo Classes
      Animation_Z
      Binary_Z
      Bitmap_Z
      Camera_Z
      CollisionVol_Z
      Fonts_Z
      GameObj_Z
      GenWorld_Z
      GwRoad_Z
      Keyframer*_Z
      Light_Z
      LightData_Z
      Lod_Z
      LodData_Z
      Material_Z
      MaterialAnim_Z
      MaterialObj_Z
      Mesh_Z
      MeshData_Z
      Node_Z
      Omni_Z
      Particles_Z
      ParticlesData_Z
      RotShape_Z
      RotShapeData_Z
      Rtc_Z
      Skel_Z
      Skin_Z
      Sound_Z
      Spline_Z
      SplineGraph_Z
      Surface_Z
      SurfaceDatas_Z
      UserDefine_Z
      Warp_Z
      World_Z
      WorldRef_Z
Asobo File Format Idioms
Asobo CRC32
Asobo LZ Compression
Asobo Arithmetic Coding Compression
Asobo Save Game File Format Specification
Asobo Audio Formats
TotemTech/ToonTech/Zouna/ACE/BSSTech/Opal Timeline
Zouna Modding Resources
Miscellaneous

Clone this wiki locally