aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/ScenePresence.cs59
1 files changed, 0 insertions, 59 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
index 33c1932..1917ec4 100644
--- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs
@@ -1871,65 +1871,6 @@ namespace OpenSim.Region.Framework.Scenes
1871 PhysicsActor.SetAlwaysRun = pSetAlwaysRun; 1871 PhysicsActor.SetAlwaysRun = pSetAlwaysRun;
1872 } 1872 }
1873 } 1873 }
1874
1875 public BinBVHAnimation GenerateRandomAnimation()
1876 {
1877 int rnditerations = 3;
1878 BinBVHAnimation anim = new BinBVHAnimation();
1879 List<string> parts = new List<string>();
1880 parts.Add("mPelvis");parts.Add("mHead");parts.Add("mTorso");
1881 parts.Add("mHipLeft");parts.Add("mHipRight");parts.Add("mHipLeft");parts.Add("mKneeLeft");
1882 parts.Add("mKneeRight");parts.Add("mCollarLeft");parts.Add("mCollarRight");parts.Add("mNeck");
1883 parts.Add("mElbowLeft");parts.Add("mElbowRight");parts.Add("mWristLeft");parts.Add("mWristRight");
1884 parts.Add("mShoulderLeft");parts.Add("mShoulderRight");parts.Add("mAnkleLeft");parts.Add("mAnkleRight");
1885 parts.Add("mEyeRight");parts.Add("mChest");parts.Add("mToeLeft");parts.Add("mToeRight");
1886 parts.Add("mFootLeft");parts.Add("mFootRight");parts.Add("mEyeLeft");
1887 anim.HandPose = 1;
1888 anim.InPoint = 0;
1889 anim.OutPoint = (rnditerations * .10f);
1890 anim.Priority = 7;
1891 anim.Loop = false;
1892 anim.Length = (rnditerations * .10f);
1893 anim.ExpressionName = "afraid";
1894 anim.EaseInTime = 0;
1895 anim.EaseOutTime = 0;
1896
1897 string[] strjoints = parts.ToArray();
1898 anim.Joints = new binBVHJoint[strjoints.Length];
1899 for (int j = 0; j < strjoints.Length; j++)
1900 {
1901 anim.Joints[j] = new binBVHJoint();
1902 anim.Joints[j].Name = strjoints[j];
1903 anim.Joints[j].Priority = 7;
1904 anim.Joints[j].positionkeys = new binBVHJointKey[rnditerations];
1905 anim.Joints[j].rotationkeys = new binBVHJointKey[rnditerations];
1906 Random rnd = new Random();
1907 for (int i = 0; i < rnditerations; i++)
1908 {
1909 anim.Joints[j].rotationkeys[i] = new binBVHJointKey();
1910 anim.Joints[j].rotationkeys[i].time = (i*.10f);
1911 anim.Joints[j].rotationkeys[i].key_element.X = ((float) rnd.NextDouble()*2 - 1);
1912 anim.Joints[j].rotationkeys[i].key_element.Y = ((float) rnd.NextDouble()*2 - 1);
1913 anim.Joints[j].rotationkeys[i].key_element.Z = ((float) rnd.NextDouble()*2 - 1);
1914 anim.Joints[j].positionkeys[i] = new binBVHJointKey();
1915 anim.Joints[j].positionkeys[i].time = (i*.10f);
1916 anim.Joints[j].positionkeys[i].key_element.X = 0;
1917 anim.Joints[j].positionkeys[i].key_element.Y = 0;
1918 anim.Joints[j].positionkeys[i].key_element.Z = 0;
1919 }
1920 }
1921
1922 AssetBase Animasset = new AssetBase(UUID.Random(), "Random Animation", (sbyte)AssetType.Animation);
1923 Animasset.Data = anim.ToBytes();
1924 Animasset.Temporary = true;
1925 Animasset.Local = true;
1926 Animasset.Description = "dance";
1927 //BinBVHAnimation bbvhanim = new BinBVHAnimation(Animasset.Data);
1928
1929 m_scene.AssetService.Store(Animasset);
1930 Animator.AddAnimation(Animasset.FullID, UUID);
1931 return anim;
1932 }
1933 1874
1934 public void HandleStartAnim(IClientAPI remoteClient, UUID animID) 1875 public void HandleStartAnim(IClientAPI remoteClient, UUID animID)
1935 { 1876 {