Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public MeshStateDataViewModel()
 {
     _stateData         = new MeshStatesData();
     States             = new ObservableCollection <StateViewModel>();
     AddStateCommand    = new DelegateCommand(AddState);
     RemoveStateCommand = new DelegateCommand <StateViewModel>(RemoveState);
 }
Exemplo n.º 3
0
        public MeshStateDataViewModel(MeshStatesData stateData)
        {
            _stateData         = stateData;
            States             = new ObservableCollection <StateViewModel>();
            AddStateCommand    = new DelegateCommand(AddState);
            RemoveStateCommand = new DelegateCommand <StateViewModel>(RemoveState);

            foreach (State state in _stateData.states)
            {
                States.Add(new StateViewModel(state));
            }
        }
Exemplo n.º 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();
 }