use crate::integer::{Planar64Vec3,Planar64Affine3}; use crate::gameplay_attributes; pub type TextureCoordinate=glam::Vec2; pub type Color4=glam::Vec4; #[derive(Clone,Hash,PartialEq,Eq)] pub struct IndexedVertex{ pub pos:u32, pub tex:u32, pub normal:u32, pub color:u32, } pub struct VertexId(u32); pub struct IndexedVertexList{ pub vertices:Vec, } pub struct GroupId(u32); pub enum IndexedGroup{ PolygonList(Vec), //TriangleStrip(Vec), } pub struct RenderId(u32); pub struct IndexedGraphicsGroup{ //Render pattern material/texture/shader/flat color pub render:RenderId, pub groups:Vec, } pub struct IndexedPhysicsGroup{ //the polygons in this group are guaranteed to make a closed convex shape pub groups:Vec, } //This is a superset of PhysicsModel and GraphicsModel pub struct IndexedModel{ pub unique_pos:Vec,//Unit32Vec3 pub unique_normal:Vec,//Unit32Vec3 pub unique_tex:Vec, pub unique_color:Vec, pub unique_vertices:Vec, //groups are constant texture AND convexity slices pub groups:Vec, //graphics indexed (by texture) pub graphics_sets:Vec, //physics indexed (by convexity) pub physics_sets:Vec, } #[derive(Clone,Copy,Hash,Eq,PartialEq)] pub struct ModelId(u32); pub struct Model{ pub model:ModelId, pub attributes:gameplay_attributes::CollisionAttributesId, pub color:Color4,//transparency is in here pub transform:Planar64Affine3, }