NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches
model.hpp
Go to the documentation of this file.
1
13
14#pragma once
15
16#include <array>
17#include <cstring>
18#include <map>
19#include <vector>
20
23#include "NNL/common/io.hpp"
27
32#ifdef __DOXYGEN__
45#define NNL_UVANIM_MAX_DUR 1000
46#endif
48
49namespace nnl {
54
59namespace model {
76constexpr std::size_t kMaxNumBonePerPrim = 8;
77
85enum class UVAnimationMode : u16 {
86 kNone = 0,
94
102
109};
110
126enum class PrimitiveType : u16 {
127 kPoints = 0,
128 kLines = 1,
129 kLineStrip = 2,
130 kTriangles = 3,
131 kTriangleStrip = 4,
132 kTriangleFan = 5,
133 kSprites = 6
134};
135
147
148 kNone = 0,
149
150 kVertexColors = 0b000000001,
155
156 kLit = 0b000000010,
164 kProjectionMapping = 0b000000100,
169 kAdditiveBlending = 0b000001000,
172
173 kSubtractiveBlending = 0b000010000,
176 kNoDepthWriteDefer = 0b000100000,
180 kAlphaClip = 0b001000000,
182 kSkinning = 0b010000000,
185 kEnvironmentMapping = 0b100000000
191};
192
194
195
206struct Bone {
208 glm::vec3 scale{1.0f};
209 glm::vec3 rotation{0.0f};
211 glm::vec3 translation{0.0f};
212};
213
227 i16 original_texture_id = 0;
228 i16 new_texture_id = 0;
229};
230
262
278 glm::mat4 transform{1.0f};
280};
281
298struct BBox {
301 glm::vec3 min{0.0f};
302 glm::vec3 max{0.0f};
303};
304
326
352struct SubMesh {
356
363 std::vector<Primitive> primitives;
364
365 std::array<BoneIndex, kMaxNumBonePerPrim> bone_indices{0};
370 std::vector<u32> display_list;
380};
381
387struct Mesh {
388 std::vector<SubMesh> submeshes;
390 bool use_skinning = false;
395 bool use_bbox = false;
396
399};
400
416struct MeshGroup {
417 std::vector<Mesh> meshes;
418 f32 u_scale = 1.0f;
419 f32 v_scale = 1.0f;
420 f32 u_offset = 0.0f;
421 f32 v_offset = 0.0f;
422};
423
440struct Material {
441 u32 specular = 0xFF000000;
443 u32 diffuse = 0xFFFFFFFF;
445 u32 ambient = 0xFF808080;
447 u32 emissive = 0xFF000000;
458};
459
478struct Model {
479 std::vector<Bone> skeleton;
481
482 bool move_with_root = false;
484
485 std::map<BoneIndex, glm::mat4> inverse_matrix_bone_table;
491
492 std::vector<std::map<BoneTarget, BoneIndex>> bone_target_tables;
503
504 std::vector<TextureSwap> texture_swaps;
506
507 std::vector<Attachment> attachments;
509
510 std::vector<UVAnimation> uv_animations;
512
513 std::vector<MeshGroup> mesh_groups;
515
516 std::vector<Material> materials;
518};
519
529enum class CompLvl {
530 kNone = 0,
532 kMax = 2
534};
535
545
549 bool indexed = true;
551 bool use_bbox = false;
553 bool optimize_weights = false;
555 bool use_strips = true;
556 bool stitch_strips = true;
558 bool join_submeshes = true;
560};
561
575Model Convert(SModel&& smodel, const std::vector<ConvertParam>& mesh_params, bool move_with_root = false);
589Model Convert(SModel&& smodel, const ConvertParam& mesh_params = {}, bool move_with_root = false);
601
613bool IsOfType(BufferView buffer);
614
615bool IsOfType(const std::filesystem::path& path);
616
617bool IsOfType(Reader& f);
618
633
634Model Import(const std::filesystem::path& path);
635
645[[nodiscard]] Buffer Export(const Model& model);
646
647void Export(const Model& model, const std::filesystem::path& path);
648
649void Export(const Model& model, Writer& f); // Main
651
657
666enum GeCmd : u32 {
667 kReturn = 0x0B'00'00'00,
668 kSetVertexType = 0x12'00'00'00,
670 kSetBaseAddress = 0x10'00'00'00,
673 kSetVramAddress = 0x01'00'00'00,
676 kDrawPrimitives = 0x04'00'00'00,
681};
682
694 kRoot = 0,
695 kHips = 1,
696 kSpine = 2,
697 kSpine1 = 3,
698 kNeck = 4,
699 kHead = 5,
700 kLeftShoulder = 6,
701 kLeftArm = 7,
702 kLeftForeArm = 8,
703 kLeftHand = 9,
704 kRightShoulder = 0xA,
705 kRightArm = 0xB,
706 kRightForeArm = 0xC,
707 kRightHand = 0xD,
708 kLeftUpLeg = 0xE,
709 kLeftLeg = 0xF,
710 kLeftFoot = 0x10,
711 kRightUpLeg = 0x11,
712 kRightLeg = 0x12,
713 kRightFoot = 0x13,
714 // the rest might vary depending on the asset
715 kBodyPart20 = 0x14,
716 kBodyPart21 = 0x15,
717 kBodyPart22 = 0x16,
718 kBodyPart23 = 0x17,
719 kBodyPart24 = 0x18,
720 kBodyPart25 = 0x19,
721 kBodyPart26 = 0x1A,
722 kBodyPart27 = 0x1B,
723 kBodyPart28 = 0x1C,
724 kBodyPart29 = 0x1D,
725};
726
735constexpr std::array<std::string_view, 30> bone_target_names{
736 "Root", "Hips", "Spine", "Spine1", "Neck", "Head",
737 "LeftShoulder", "LeftArm", "LeftForeArm", "LeftHand", "RightShoulder", "RightArm",
738 "RightForeArm", "RightHand", "LeftUpLeg", "LeftLeg", "LeftFoot", "RightUpLeg",
739 "RightLeg", "RightFoot", "BodyPart20", "BodyPart21", "BodyPart22", "BodyPart23",
740 "BodyPart24", "BodyPart25", "BodyPart26", "BodyPart27", "BodyPart28", "BodyPart29"};
741
753std::vector<STriangle> ExtractTriangles(const SubMesh& submesh, bool skip_degenerate = true);
766
782std::vector<TriangleGroup> GroupTrianglesByBones(const std::vector<u32>& indices, const std::vector<SVertex>& vertices,
783 u32 max_num_triangles = std::numeric_limits<u16>::max() / 3,
784 bool join_bone_sets = true);
796BBox GenerateBBox(const SMesh& mesh, glm::mat4 transform = glm::mat4(1.0f));
797
808Mesh Convert(SMesh&& smesh, const ConvertParam& param = {});
816SMesh Convert(const Mesh& mesh);
838std::vector<ConvertParam> GenerateConvertParam(const Model& model);
848std::vector<Bone> Convert(const SSkeleton& skeleton);
849
876void SetBoneNames(SSkeleton& skeleton, const std::vector<std::map<BoneTarget, BoneIndex>>& bone_target_tables,
877 bool is_character = true);
892std::vector<std::map<BoneTarget, BoneIndex>> GenerateBoneTargetTables(const SSkeleton& skeleton);
904SSkeleton Convert(const std::vector<Bone>& bones);
905
919std::map<BoneIndex, glm::mat4> GenerateInverseMatrixBoneTable(const SModel& smodel);
920
931UVAnimation Convert(const SUVChannel& suv_anim_channel);
932
940
948
956 // Auxiliary
958
959namespace raw {
960
974
980constexpr u32 kMagicBytes = 0x16'81'00'01;
981
982NNL_PACK(struct RHeader {
983 u32 magic_bytes = kMagicBytes;
984 u32 offset_bones = 0; // 0x4;
985 u32 offset_inverse_matrices = 0; // 0x8
986 u32 offset_inverse_matrix_bone_table = 0; // 0xC
987 u32 offset_mesh_groups = 0; // 0x10
988 u16 num_bones = 0; // 0x14
989 u16 num_mesh_groups = 0; // 0x16
990 u16 num_inverse_matrices = 0; // 0x18
991 u16 num_vfx_groups = 0; // 0x1A
992 u32 header_size = sizeof(RHeader); // 0x1C probably...
993 u16 move_with_root = 0; // 0x20
994 u16 num_bone_target_tables = 0; // 0x22; 2 is max
995 u32 offset_bone_target_tables = 0; // 0x24
996 u16 num_attachment_matrices = 0; // 0x28;
997 u16 num_uv_animations = 0; // 0x2A
998 u32 offset_attachment_matrices = 0; // 0x2C
999 u32 offset_uv_animations = 0; // 0x30
1000
1001 u16 num_textures = 0; // 0x34 total number of used textures
1002 u16 num_texture_swaps = 0; // 0x36
1003 u32 offset_texture_swaps = 0; // 0x38
1004 u32 address = 0; // 0x3C memory location, filled dynamically
1005});
1006
1007static_assert(sizeof(RHeader) == 0x40);
1008
1009NNL_PACK(struct RBone {
1010 Vec3<f32> scale{0.0f};
1011 i16 parent_index = 0;
1012 Vec3<i16> rotation{0}; // pitch; yaw; roll; as normalized ints
1013 Vec3<f32> translation{0.0f};
1014});
1015
1016static_assert(sizeof(RBone) == 0x20);
1017
1018NNL_PACK(struct RBBox {
1019 u16 bone_index = 0;
1020 u8 padding[0xE] = {0};
1021 Vec4<f32> vertices[8] = {0.0f};
1022 // 0 minX, minY, minZ
1023 // 1 maxX, minY, minZ
1024 // 2 minX, maxY, minZ
1025 // 3 maxX, maxY, minZ
1026 // 4 minX, minY, maxZ
1027 // 5 maxX, minY, maxZ
1028 // 6 minX, maxY, maxZ
1029 // 7 maxX, maxY, maxZ
1030});
1031
1032static_assert(sizeof(RBBox) == 0x90);
1033
1034NNL_PACK(struct RAttachment {
1035 u16 bone_id = 0;
1036 u16 attachment_id = 0;
1037});
1038
1039static_assert(sizeof(RAttachment) == 0x4);
1040
1041NNL_PACK(struct RUVAnimation {
1042 u16 animation_mode = 0;
1043 u16 num_frames = 0;
1044 f32 u_shift = 0;
1045 f32 v_shift = 0;
1046 u32 unknown = 0; // reserved (?)
1047});
1048
1049static_assert(sizeof(RUVAnimation) == 0x10);
1050
1051NNL_PACK(struct RTextureSwap {
1052 u32 id = 0; // not used
1053 i16 original_texture_id = 0;
1054 i16 new_texture_id = 0;
1055});
1056
1057static_assert(sizeof(RTextureSwap) == 0x8);
1058
1059NNL_PACK(struct RBoneTargetHeader {
1060 u32 offset = 0;
1061 u32 num_entries = 0;
1062});
1063
1064static_assert(sizeof(RBoneTargetHeader) == 0x8);
1065
1066NNL_PACK(struct RBoneTargetEntry {
1067 u16 bone_index = 0;
1068 u16 role_id = 0;
1069});
1070
1071static_assert(sizeof(RBoneTargetEntry) == 0x4);
1072
1073struct RBoneTargetTables {
1074 std::vector<RBoneTargetHeader> header;
1075 std::vector<std::vector<RBoneTargetEntry>> entries;
1076};
1077
1078NNL_PACK(struct RMeshGroup {
1079 u32 offset_meshes = 0; // 0x0
1080 u16 num_meshes = 0; // 0x4
1081 u16 padding = 0; // 0x6
1082 f32 u_scale = 0.0f; // 0x8
1083 f32 v_scale = 0.0f; // 0xC
1084 f32 u_offset = 0.0f; // 0x10
1085 f32 v_offset = 0.0f; // 0x14
1086});
1087
1088static_assert(sizeof(RMeshGroup) == 0x18);
1089
1090NNL_PACK(struct RMesh {
1091 u32 offset_submeshes = 0; // 0x0
1092 u16 num_submeshes = 0; // 0x24
1093 u16 material_features = 0; // 0x6
1094 u32 specular = 0; // 0x8
1095 u32 diffuse = 0; // 0xC
1096 u32 ambient = 0; // 0x10
1097 u32 emissive = 0; // 0x14
1098 f32 specular_power = 0.0f; // 0x18
1099 i16 texture_id = 0; // 0x1C
1100 u16 use_bbox = false; // 0x1E
1101 u32 offset_bbox = 0; // 0x20 if not used, set to the first offset to submeshes
1102 u16 material_id = 0; // 0x24 note: there is no separate array of
1103 // materials in the binary format. This number is used to
1104 // determine if the next mesh uses the same material or not
1105 u8 vfx_group_id = 0; // 0x26
1106 u8 uv_animation_id = 0; // 0x27
1107});
1108
1109static_assert(sizeof(RMesh) == 0x28);
1110
1111NNL_PACK(struct RSubMesh {
1112 u16 num_bones = 0; // 0x0
1113 u16 num_primitives = 0; // 0x2
1114
1115 u32 vertex_format = 0; // 0x4
1116 u32 offset_indexed_vertex_buffer = 0; // 0x8
1117 u32 offset_primitives = 0; // 0xC
1118 u16 inv_mat_bone_indices[kMaxNumBonePerPrim] = {0}; // 0x10 note: entries in the "inverse matrix to bone" table!
1119 u32 offset_display_list = 0; // 0x20
1120});
1121
1122static_assert(sizeof(RSubMesh) == 0x24);
1123
1124NNL_PACK(struct RPrimitive {
1125 u16 primitive_type = 0;
1126 u16 num_elements = 0;
1127 u32 offset_buffer = 0; // offset to vertex buffer or to index buffer
1128 u32 buffer_size = 0; // aligned to 0x40
1129 u32 ptr_vram_vertex_buffer = 0; // set by the game
1130});
1131
1132static_assert(sizeof(RPrimitive) == 0x10);
1133
1134struct RModel {
1135 RHeader header;
1136
1137 std::vector<RBone> bones;
1138 // padding to 0x10
1139 std::vector<Mat4<f32>> inverse_matrices;
1140 std::vector<RTextureSwap> texture_swaps;
1141 std::vector<u16> inverse_matrix_bone_table;
1142 // padding to 0x4
1143 RBoneTargetTables bone_target_tables;
1144 // padding to 0x10
1145 std::vector<Mat4<f32>> attachment_matrices;
1146 std::vector<RAttachment> attachments;
1147 // padding to 0x4
1148 std::vector<RUVAnimation> uv_animations;
1149 // padding to 0x10
1150 std::vector<RMeshGroup> mesh_groups;
1151 // Maps of offsets (used in the structures above) to their data:
1152 std::map<u32, std::vector<RMesh>> meshes;
1153 std::map<u32, RBBox> bboxes;
1154 std::map<u32, std::vector<RSubMesh>> submeshes;
1155 std::map<u32, std::vector<RPrimitive>> primitives;
1156 std::map<u32, std::vector<u32>> display_lists;
1157 std::map<u32, Buffer> vertex_buffers; // stores vertex buffers or
1158 // index buffers
1159 std::map<u32, Buffer> indexed_vertex_buffers; // stores vertex buffers
1160 // when indexed drawing is used
1161};
1162
1163std::vector<Bone> Convert(const std::vector<raw::RBone>& rbones);
1164
1165Model Convert(RModel&& rmodel);
1166
1167RModel Parse(Reader& f);
1168
1169std::vector<raw::RBone> Convert(const std::vector<Bone>& bones);
1170 // Raw
1172} // namespace raw
1173
1174} // namespace model
1175 // Model
1176} // namespace nnl
Contains macros for defining flag enums.
Contains macros and definitions for fixed-width types.
3D vector template with packed storage
Definition fixed_type.hpp:163
std::uint16_t u16
16-bit unsigned integer
Definition fixed_type.hpp:62
std::int16_t i16
16-bit signed integer
Definition fixed_type.hpp:63
float f32
32-bit floating point
Definition fixed_type.hpp:59
std::uint32_t u32
32-bit unsigned integer
Definition fixed_type.hpp:60
std::uint8_t u8
8-bit unsigned integer
Definition fixed_type.hpp:64
#define NNL_PACK(...)
A structure packing directive.
Definition fixed_type.hpp:41
#define NNL_DEFINE_ENUM_OPERATORS(ENUMTYPE)
Macro to define bitwise operators for enum types.
Definition enum_flag.hpp:36
#define NNL_FLAG_ENUM
An attribute for defining flag enums.
Definition enum_flag.hpp:28
Reader implementation for read-only memory buffers.
Definition io.hpp:598
Abstract class for writing data.
Definition io.hpp:136
Abstract class for reading data.
Definition io.hpp:78
std::vector< u8 > Buffer
A type alias for std::vector<u8> that denotes a raw, contiguous memory region that may be interpreted...
Definition io.hpp:40
utl::StaticSet< BoneIndex, kMaxNumBonePerPrim > bones
Unique bones.
Definition model.hpp:763
std::vector< u32 > indices
Triangles associated with the bones.
Definition model.hpp:764
Represents a group of triangles associated with specific bones.
Definition model.hpp:762
constexpr std::array< std::string_view, 30 > bone_target_names
An array that associates a generic bone id with a name.
Definition model.hpp:735
std::vector< std::map< BoneTarget, BoneIndex > > GenerateBoneTargetTables(const SSkeleton &skeleton)
Generates bone target tables from bone names of the skeleton.
void SetBoneNames(SSkeleton &skeleton, const std::vector< std::map< BoneTarget, BoneIndex > > &bone_target_tables, bool is_character=true)
Assigns meaningful names to bones in a skeleton.
ConvertParam GenerateConvertParam(const Mesh &mesh)
Generates a conversion parameter for SMesh to get a similar in-game Mesh when converting back to it.
std::map< BoneIndex, glm::mat4 > GenerateInverseMatrixBoneTable(const SModel &smodel)
Generates a map of bone indices and inverse matrices.
GeCmd
Enumeration of essential rendering commands for the library.
Definition model.hpp:666
std::vector< STriangle > ExtractTriangles(const SubMesh &submesh, bool skip_degenerate=true)
Extracts triangles from a given submesh.
BBox GenerateBBox(const SMesh &mesh, glm::mat4 transform=glm::mat4(1.0f))
Generates an axis-aligned bounding box (AABB) for the given mesh.
HumanoidRigTarget
Enum representing parts of a generic humanoid rig.
Definition model.hpp:693
std::vector< TriangleGroup > GroupTrianglesByBones(const std::vector< u32 > &indices, const std::vector< SVertex > &vertices, u32 max_num_triangles=std::numeric_limits< u16 >::max()/3, bool join_bone_sets=true)
Groups triangles by their associated bones.
@ kDrawPrimitives
Definition model.hpp:676
@ kSetBaseAddress
Definition model.hpp:670
@ kSetVertexType
Definition model.hpp:668
@ kSetVramAddress
Definition model.hpp:673
@ kReturn
Marks the end of the display list.
Definition model.hpp:667
bool move_with_root
Definition model.hpp:482
u32 diffuse
Definition model.hpp:443
f32 u_scale
Scale factor for the U texture coordinate.
Definition model.hpp:418
glm::vec3 min
The min coordinate.
Definition model.hpp:301
f32 v_offset
Offset for the V texture coordinate.
Definition model.hpp:421
u32 ambient
Definition model.hpp:445
Buffer indexed_vertex_buffer
Definition model.hpp:359
bool indexed
Definition model.hpp:549
u8 uv_animation_id
Definition model.hpp:451
f32 v_shift
Same as u_shift but for the v coordinate.
Definition model.hpp:260
u16 num_elements
Definition model.hpp:318
f32 u_shift
Definition model.hpp:255
bool use_strips
Specifies whether to use triangles or triangle strips.
Definition model.hpp:555
std::vector< MeshGroup > mesh_groups
Definition model.hpp:513
u32 emissive
Definition model.hpp:447
glm::vec3 rotation
Definition model.hpp:209
std::vector< UVAnimation > uv_animations
Definition model.hpp:510
glm::mat4 transform
Definition model.hpp:278
u32 vertex_format
Definition model.hpp:357
BoneIndex bone_index
Definition model.hpp:299
bool stitch_strips
Definition model.hpp:556
std::vector< std::map< BoneTarget, BoneIndex > > bone_target_tables
Definition model.hpp:492
u8 vfx_group_id
Definition model.hpp:453
bool optimize_weights
Definition model.hpp:553
i16 parent_index
An index into the array of bones; -1 means a bone has no parent.
Definition model.hpp:207
BoneIndex bone_id
Definition model.hpp:274
UVAnimationMode animation_mode
Defines how shifting occurs.
Definition model.hpp:247
std::array< BoneIndex, kMaxNumBonePerPrim > bone_indices
Definition model.hpp:365
BBox bbox
The bounding box of the mesh.
Definition model.hpp:397
std::vector< Material > materials
Definition model.hpp:516
std::map< BoneIndex, glm::mat4 > inverse_matrix_bone_table
Definition model.hpp:485
PrimitiveType primitive_type
Type of the primitive.
Definition model.hpp:317
std::vector< u32 > display_list
Definition model.hpp:370
std::vector< Mesh > meshes
Collection of meshes that belong to this group.
Definition model.hpp:417
std::vector< SubMesh > submeshes
Definition model.hpp:388
glm::vec3 scale
The scale transform.
Definition model.hpp:208
std::vector< Bone > skeleton
Definition model.hpp:479
f32 v_scale
Scale factor for the V texture coordinate.
Definition model.hpp:419
u32 force_vertex_format
Definition model.hpp:546
Buffer vertex_index_buffer
Definition model.hpp:320
f32 specular_power
Power of the specular highlight.
Definition model.hpp:449
bool use_bbox
Definition model.hpp:551
u16 num_frames
Definition model.hpp:249
glm::vec3 translation
The translation transform.
Definition model.hpp:211
u32 specular
Definition model.hpp:441
i16 texture_id
Index of the texture; -1 indicates no texture.
Definition model.hpp:450
std::vector< Primitive > primitives
List of primitives that make up this submesh.
Definition model.hpp:363
bool use_skinning
Definition model.hpp:390
f32 u_offset
Offset for the U texture coordinate.
Definition model.hpp:420
bool join_submeshes
Definition model.hpp:558
glm::vec3 max
The max coordinate.
Definition model.hpp:302
std::vector< TextureSwap > texture_swaps
Definition model.hpp:504
u16 material_id
The index of the material associated with this mesh.
Definition model.hpp:398
std::vector< Attachment > attachments
Definition model.hpp:507
u16 attachment_id
Definition model.hpp:276
MaterialFeatures features
Render settings for the material.
Definition model.hpp:457
CompLvl compress_lvl
Definition model.hpp:543
bool use_bbox
Flag indicating whether to use the bounding box.
Definition model.hpp:395
u16 num_bones
Definition model.hpp:353
Represents a UV animation configuration.
Definition model.hpp:246
This struct defines various properties of a mesh.
Definition model.hpp:387
Represents a 3D model with various components.
Definition model.hpp:478
Represents the properties of a material.
Definition model.hpp:440
Represents a configuration for texture swapping.
Definition model.hpp:226
Represents a group of meshes.
Definition model.hpp:416
Represents a bone/joint in a skeleton.
Definition model.hpp:206
Parameters for converting a simplified mesh to the in-game format.
Definition model.hpp:542
Represents a smaller part of a mesh.
Definition model.hpp:352
Represents a configuration for attaching an external object to a model.
Definition model.hpp:273
Represents the smallest unit of geometry in the hierarchy.
Definition model.hpp:316
Represents a bounding box for objects.
Definition model.hpp:298
UVAnimationMode
Specifies the different modes of UV animation for textures.
Definition model.hpp:85
Model Import(BufferView buffer)
Parses a binary file and converts it to a structured model.
Model Convert(SModel &&smodel, const std::vector< ConvertParam > &mesh_params, bool move_with_root=false)
Converts a simplified model representation to the in-game format.
CompLvl
Enum representing compression levels for mesh conversion.
Definition model.hpp:529
Buffer Export(const Model &model)
Converts a model to its binary file representation.
MaterialFeatures
Enumeration of material features used in rendering.
Definition model.hpp:146
bool IsOfType(BufferView buffer)
Tests if the provided file is a model.
constexpr std::size_t kMaxNumBonePerPrim
Maximum number of bones that can influence a single primitive and a single vertex.
Definition model.hpp:76
PrimitiveType
Enumeration of supported primitive types.
Definition model.hpp:126
@ kContinuousShift
Definition model.hpp:89
@ kNone
Definition model.hpp:86
@ kFramedShift
Definition model.hpp:103
@ kRangedShift
Definition model.hpp:95
@ kMedium
Uses shorts and bytes for attributes, RGBA4444 for color.
Definition model.hpp:531
@ kMax
Definition model.hpp:532
@ kLit
Definition model.hpp:156
@ kSkinning
Definition model.hpp:182
@ kEnvironmentMapping
Definition model.hpp:185
@ kNoDepthWriteDefer
Definition model.hpp:176
@ kAlphaClip
Definition model.hpp:180
@ kAdditiveBlending
Definition model.hpp:169
@ kSubtractiveBlending
Definition model.hpp:173
@ kProjectionMapping
Definition model.hpp:164
@ kVertexColors
Definition model.hpp:150
constexpr u32 kMagicBytes
Magic bytes used to identify the model format.
Definition model.hpp:980
u16 BoneIndex
Represents a concrete bone index in a skeleton/bone array.
Definition model_common.hpp:34
u16 BoneTarget
Represents a generic bone identifier.
Definition model_common.hpp:51
A single animation track for UV coordinates.
Definition sanimation.hpp:158
Represents a simple material with various properties for 3D rendering.
Definition smodel.hpp:578
Represents a simple mesh.
Definition smodel.hpp:212
Represents a simple model.
Definition smodel.hpp:654
Represents the skeleton of a 3D model.
Definition smodel.hpp:485
Fixed-size sorted set implementation.
Definition static_set.hpp:28
Provides classes for reading and writing binary data to and from various sources.
Contains model-related definitions that are shared across different parts of the library.
Contains structures and functions for working with in-game 3D models.
Definition model.hpp:59
Definition exception.hpp:56
Provides data structures and functions for managing essential components of a 3D model.
Defines a set that is sorted and has a fixed capacity.