public IsValid ( |
||
solver | ||
logger | Warning | |
리턴 | bool |
public override bool IsValid(ref string message) { if (chain == null) { message = "FBIK chain is null, can't initiate solver."; return(false); } if (chain.Length == 0) { message = "FBIK chain length is 0, can't initiate solver."; return(false); } for (int i = 0; i < chain.Length; i++) { if (!chain[i].IsValid(ref message)) { return(false); } } foreach (IKEffector e in effectors) { if (!e.IsValid(this, ref message)) { return(false); } } if (!spineMapping.IsValid(this, ref message)) { return(false); } foreach (IKMappingLimb l in limbMappings) { if (!l.IsValid(this, ref message)) { return(false); } } foreach (IKMappingBone b in boneMappings) { if (!b.IsValid(this, ref message)) { return(false); } } return(true); }
public override bool IsValid(bool log) { if (log) { if (!chain.IsValid(LogWarning)) { return(false); } } else if (!chain.IsValid()) { return(false); } foreach (IKEffector e in effectors) { if (!e.IsValid(this, LogWarning)) { return(false); } } foreach (IKConstraintBend b in bendConstraints) { if (!b.IsValid(this, LogWarning)) { return(false); } } if (!spineMapping.IsValid(this, LogWarning)) { return(false); } foreach (IKMappingLimb l in limbMappings) { if (!l.IsValid(this, LogWarning)) { return(false); } } foreach (IKMappingBone b in boneMappings) { if (!b.IsValid(this, LogWarning)) { return(false); } } return(true); }
public override bool IsValid(bool log) { if (chain == null) { LogWarning("FBIK chain is null, can't initiate solver."); return(false); } if (chain.Length == 0) { LogWarning("FBIK chain length is 0, can't initiate solver."); return(false); } for (int i = 0; i < chain.Length; i++) { if (log) { if (!chain[i].IsValid(LogWarning)) { return(false); } } else { if (!chain[i].IsValid()) { return(false); } } } foreach (IKEffector e in effectors) { if (!e.IsValid(this, LogWarning)) { return(false); } } foreach (IKConstraintBend b in bendConstraints) { if (!b.IsValid(this, LogWarning)) { return(false); } } if (!spineMapping.IsValid(this, LogWarning)) { return(false); } foreach (IKMappingLimb l in limbMappings) { if (!l.IsValid(this, LogWarning)) { return(false); } } foreach (IKMappingBone b in boneMappings) { if (!b.IsValid(this, LogWarning)) { return(false); } } return(true); }