示例#1
0
        public void Load(List <String> p_model)
        {
            if (p_model == null)
            {
                return;
            }

            Pax4ModelState modelState = null;

            Matrix[] matTemp = null;
            String   model   = null;

            for (int i = 0; i < p_model.Count; i++)
            {
                model = p_model[i];
                if (GetChild().ContainsKey(model))
                {
                    continue;
                }

                modelState        = new Pax4ModelState(model, this);
                modelState._model = Pax4Game._current.Content.Load <Model>(model);

                matTemp = new Matrix[modelState._model.Bones.Count];
                modelState._model.CopyAbsoluteBoneTransformsTo(matTemp);
                modelState._matTransform = matTemp[0];
            }
        }
示例#2
0
        public void Load(String p_model)
        {
            if (p_model == null)
            {
                return;
            }

            if (GetChild().ContainsKey(p_model))
            {
                return;
            }

            Pax4ModelState modelState = new Pax4ModelState(p_model, this);

            modelState._model = Pax4Game._current.Content.Load <Model>(p_model);

            Matrix[] matTemp = new Matrix[modelState._model.Bones.Count];
            modelState._model.CopyAbsoluteBoneTransformsTo(matTemp);
            modelState._matTransform = matTemp[0];
        }
示例#3
0
 public virtual void SetModel(String p_modelName = "")
 {
     _modelState = (Pax4ModelState)Pax4Model._current.GetChild(p_modelName);
     _matWorld   = _modelState._matTransform * _matWorld;
 }
 public void SetModel(String p_modelName = "")
 {
     _modelState = (Pax4ModelState)Pax4Model._current.GetChild(p_modelName);
     _matScale   = _modelState._matTransform * _matScale;
 }