コード例 #1
0
 private void AddWeaponHold(string boneName, string mtxS)
 {
     // Offset from the bone position to the attachment point
     Matrix mtx = ParseData.StringToMatrix(mtxS);
     // The model must have been loaded first so the bonemap works
     int boneID = GetBoneID(boneName);
     AttachHold = new AttachmentPoint(boneID, mtx);
 }
コード例 #2
0
 private void AddWeaponHold(string boneName, string sX, string sY, string sZ, string sRotX, string sRotY, string sRotZ)
 {
     // Offset from the bone position to the attachment point
     float X = ParseData.FloatFromString(sX);
     float Y = ParseData.FloatFromString(sY);
     float Z = ParseData.FloatFromString(sZ);
     float rotateX = ParseData.FloatFromString(sRotX);
     float rotateY = ParseData.FloatFromString(sRotY);
     float rotateZ = ParseData.FloatFromString(sRotZ);
     // The model must have been loaded first so the bonemap works
     int boneID = GetBoneID(boneName);
     // Add the attachment point even if the bone is not valid
     // This is so that dummies can be added and ignored when attempted to be used
     AttachHold = new AttachmentPoint(boneID, X, Y, Z, rotateX, rotateY, rotateZ);
 }