Beispiel #1
0
        public Mesh(Table table)
        {
            children = new List <Mesh>();

            //General
            name        = table["Name"].StrValue;
            model       = table["Model"].StrValue;
            meshType    = MeshTypeEnumExtensions.TypeFromString(table["SpecialObjectName"].StrValue);
            systemType  = table["SystemType"].StrValue;
            sectionName = table["SectionName"].StrValue;
            uiName      = table["UIName"].StrValue;


            //Interaction
            PickSphereRADIUS = table["PickSphereRADIUS"].DoubleValue;

            //Position
            parentName = table["ParentTo"].StrValue;
            position   = new Vec3(table["Position"]);
            rotation   = new Vec3(table["Rotation"]);
            //Collision


            //Render
            render    = new MeshRenderData(table);
            collision = new MeshCollisionData(table);
            //Light
            //light = new MeshLightData(table);

            //States
            states = new MeshStatesData(table);

            //Surfaces
            surfaces = new MeshSurfacesData(table);
        }
 public MeshSurfacesDataViewModel(MeshSurfacesData surfacesData)
 {
     _surfacesData = surfacesData;
     Surfaces      = new ObservableCollection <SurfaceViewModel>();
     foreach (Surface surface in _surfacesData.surfaces)
     {
         Surfaces.Add(new SurfaceViewModel(surface));
     }
 }
Beispiel #3
0
 public Mesh()
 {
     name      = "default";
     children  = new List <Mesh>();
     render    = new MeshRenderData();
     collision = new MeshCollisionData();
     //Light
     light = new MeshLightData();
     //States
     states = new MeshStatesData();
     //Surfaces
     surfaces = new MeshSurfacesData();
 }
 public MeshSurfacesDataViewModel()
 {
     _surfacesData = new MeshSurfacesData();
     Surfaces      = new ObservableCollection <SurfaceViewModel>();
 }