X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=model.h;h=430ed26d7425d684670bddeb0931a9b9b45039de;hb=ecc4dfbfb3adf91d2dfc03ba0ec9a821fcc2390c;hp=9558d1e42b22480284e863982c2c770a0c45ce4b;hpb=1f1d636056450dcd23cce55c0795ec6276272531;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/model.h b/model.h index 9558d1e..430ed26 100644 --- a/model.h +++ b/model.h @@ -22,16 +22,6 @@ struct model marker_count; }; -struct sdf_primative -{ - v4f origin; /* xyz, yaw */ - /* Cone: - x base scale - y height - */ - v4f info; -}; - struct submodel { u32 indice_start, @@ -40,19 +30,15 @@ struct submodel vertex_count; boxf bbx; - v3f pivot; - sdf_primative sdf; - - enum esdf_type - { - k_sdf_none = 0, - k_sdf_cone, - k_sdf_sphere, - k_sdf_box - } - sdf_type; - + v3f pivot; /* same as co? */ + v4f q; char name[32]; + char material[32]; +}; + +struct classtype_gate +{ + u32 target; }; struct model_marker @@ -60,6 +46,8 @@ struct model_marker v3f co; v4f q; v3f s; + u32 classtype; + u32 offset; char name[32]; }; @@ -166,6 +154,12 @@ static u32 *submodel_indice_data( model *mdl, submodel *sub ) return model_indice_base(mdl) + sub->indice_start; } +static void *get_entdata_raw( model *mdl, model_marker *marker ) +{ + return ((void *)(model_indice_base(mdl) + mdl->indice_count)) + + marker->offset; +} + static submodel *submodel_get( model *mdl, const char *name ) { for( int i=0; ilayer_count; i++ )