/* Public domain */ typedef struct sg_material { struct ag_object _inherit; int n; /* Material index */ char name[64]; /* Name */ Uint flags; M_Real e[SG_NELEMENTS]; /* Elemental composition (%) */ M_Real density; /* Density (g/cm^-3) */ M_Real r; /* Electrical resistivity (ohms/m) */ M_Real k; /* Thermal conductivity (W/m.K) */ M_Real Texp; /* Thermal expansion (um/m.K) */ M_Real c; /* Speed of sound (m/s) */ M_Real mp; /* Melting point (degC) */ M_Real bp; /* Boiling point (degC) */ M_Real dHfus; /* Heat of fusion (kJ/mol) */ M_Real dHvap; /* Heat of vaporization (kJ/mol) */ M_Real C; /* Heat capacity (J/mol.k) */ M_Real TS; /* Tensile strength */ M_Real BHN; /* Brinell hardness */ M_Real HV; /* Vickers hardness */ M_Real HM; /* Mohs hardness */ M_Real Em; /* Young's modulus (Pa) */ M_Real Sm; /* Shear modulus (Pa) */ M_Real Km; /* Bulk modulus (Pa) */ M_Real vr; /* Poisson's ratio */ AG_Surface **textures; /* Rendering textures */ int nTextures; } SG_Material; #define SG_MATERIAL_MAX 10000 #define SG_MATERIAL_MAX_TEXTURES 16 enum sg_material_texture_types { SG_MATERIAL_TEXTURE_RAW = 1 }; __BEGIN_DECLS extern AG_ObjectClass sgMaterialClass; extern SG_Material **sgMaterials; extern Uint sgMaterialCount; void SG_InitMaterials(void); void SG_DestroyMaterials(void); int SG_LoadMaterials(const char *); __END_DECLS