public List <ParticleInfo> GenerateFromConfig() { List <ParticleInfo> particleInfo = new List <ParticleInfo>(); foreach (VertInfo vertInfo in m_vertInfoTable.VertInfoList) { ParticleInfo pInfo = new ParticleInfo { ConfigValues = m_configValues, VertInfo = vertInfo }; JointInfoDefinition jointInfo = m_jointInfoTable.GetJointInfoDefinition(vertInfo.VertID); //if a joint info doesn't exist just create a new one and add it to the list bool exists = (jointInfo != null); pInfo.JointInfo = exists ? jointInfo : null; particleInfo.Add(pInfo); } return(particleInfo); }
public bool Deserialise(Table jointInfoTable) { bool success = false; foreach (DynValue value in jointInfoTable.Values) { Table entryTable = value.Table; JointInfoDefinition jointInfo = new JointInfoDefinition { BoneName = entryTable.Get("bone").String, PositionVertID = (int)entryTable.Get("position_vert_id").Number, AimVertID = (int)entryTable.Get("aim_vert_id").Number, UpVector = entryTable.Get("up_vector").ToObject <Vector3>(), VertPairs = new List <int[]>() }; Table normalVertPairs = entryTable.Get("normal_vert_id").Table; foreach (DynValue entry in normalVertPairs.Values) { Table vertPairTable = entry.Table; int[] pair = new int[2]; for (int i = 1; i <= vertPairTable.Length; ++i) { Debug.Assert(i <= 2); int id = (int)vertPairTable.Get(i).Number; pair[(i - 1)] = id; } jointInfo.VertPairs.Add(pair); } m_jointInfoList.Add(jointInfo); } success = true; return(success); }
public void RemoveJointInfo(JointInfoDefinition jointInfo) { m_jointInfoTable.RemoveJointInfo(jointInfo); }
public void AddJointInfo(JointInfoDefinition jointInfo) { m_jointInfoTable.AddJointInfo(jointInfo); }
public void RemoveJointInfo(JointInfoDefinition jointInfoDefinition) { m_jointInfoList.Remove(jointInfoDefinition); }
public void AddJointInfo(JointInfoDefinition jointInfoDefinition) { m_jointInfoList.Add(jointInfoDefinition); }