public AnimatableModel(Game1 game, ANSKModelContent model, Vector3 pos) { _game = game; _model = new ANSKModel(model); _modelTexture = null; //_model = ModelRegistry.GetModel("TestNormalBlendOppCorners2"); _ansk = new ANSK( _model, game); //_skinData = _model.Tag as ANSKTagData; //if (_skinData == null) if (_ansk.SkinningAndBasicAnims == null) throw new InvalidOperationException("The model " + _model.ToString() + " does not contain the data needed for animations."); //_player = new AnimationPlayer(_skinData); _player = new AnimationPlayer(_ansk.SkinningAndBasicAnims); _currentClip = null; _player.Looped = false; _collisionSphereRadius = 0.1f; _parentCollisionSphereRadius = 0.6f; GenerateBoundingSpheres(Matrix.Identity); }
public ANSKTest(Game1 game, Vector3 pos, float speed, ANSKModelContent model) : base(game, pos, speed) { _model = new AnimatableModel(game, model, pos); //_model.ChangeAnimationSpeedTicks(-150000f); //Scale(0.3f); }
//public ANSKTagData TagData { get { return _tagData; } } public ANSKModel(ANSKModelContent content) { _tagData = content.TagData; _verts = content.Verticies; RemakeIndices(content.VertexIndicies); _uvs = content.Uvs; _uvIndicies = content.UvIndicies; _edges = content.Edges; _normals = content.Normals; _skeleton = content.Joints; _joints = _skeleton.ToJointList(); _skin = content.TagData.SkinData; _skeleton.Init(); // Find a way to load in the effect; _verticies = new ANSKVertexDeclaration[_verts.Count]; _poop = new VertexPositionColor[_verts.Count]; }