Exemple #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 MeshRenderDataViewModel()
 {
     _render              = new MeshRenderData();
     Textures             = new ObservableCollection <TextureViewModel>();
     AddTextureCommand    = new DelegateCommand(AddTexture);
     RemoveTextureCommand = new DelegateCommand <TextureViewModel>(RemoveTexture);
 }
        public MeshRenderDataViewModel(MeshRenderData render)
        {
            _render              = render;
            Textures             = new ObservableCollection <TextureViewModel>();
            AddTextureCommand    = new DelegateCommand(AddTexture);
            RemoveTextureCommand = new DelegateCommand <TextureViewModel>(RemoveTexture);

            foreach (Texture texture in _render.textures)
            {
                Textures.Add(new TextureViewModel(this, texture));
            }
        }
Exemple #4
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();
 }