/* * Check if this chain is valid or not. * */ public bool IsValid(Warning.Logger logger = null) { if (nodes.Length == 0) { if (logger != null) { logger("FBIK chain contains no nodes."); } return(false); } foreach (IKSolver.Node node in nodes) { if (node.transform == null) { if (logger != null) { logger("Node transform is null in FBIK chain."); } return(false); } } return(true); }
/// <summary> /// Checks whether this FABRIKChain is valid. /// </summary> public bool IsValid(Warning.Logger logger) { if (ik == null) { if (logger != null) { logger("IK unassigned in FABRIKChain."); } return(false); } if (!ik.solver.IsValid(true)) { return(false); } foreach (FABRIKChain c in children) { if (!c.IsValid(logger)) { return(false); } } return(true); }
public bool IsValid(Warning.Logger logger = null) { if (this.nodes.Length == 0) { if (logger != null) { logger("FBIK chain contains no nodes."); } return(false); } IKSolver.Node[] array = this.nodes; for (int i = 0; i < array.Length; i++) { IKSolver.Node node = array[i]; if (node.transform == null) { if (logger != null) { logger("Node transform is null in FBIK chain."); } return(false); } } return(true); }
public bool IsValid(Warning.Logger logger) { if (this.ik == null) { if (logger != null) { logger("IK unassigned in FABRIKChain."); } return(false); } return(this.ik.solver.IsValid(logger != null)); }
public override bool IsValid(IKSolver solver, Warning.Logger logger = null) { if (!base.IsValid(solver, logger)) { return(false); } if (this.bone == null) { if (logger != null) { logger("IKMappingBone's bone is null."); } return(false); } return(true); }
// Token: 0x060009E1 RID: 2529 RVA: 0x0004444A File Offset: 0x0004284A public static void Log(string message, Warning.Logger logger, bool logInEditMode = false) { if (!logInEditMode && !Application.isPlaying) { return; } if (Warning.logged) { return; } if (logger != null) { logger(message); } Warning.logged = true; }
protected bool BoneIsValid(Transform bone, IKSolver solver, Warning.Logger logger = null) { if (bone == null) { if (logger != null) { logger("IKMappingLimb contains a null reference."); } return(false); } if (solver.GetPoint(bone) == null) { if (logger != null) { logger("IKMappingLimb is referencing to a bone '" + bone.name + "' that does not excist in the Node Chain."); } return(false); } return(true); }
public float weight = 1f; // Added in 0.2 /// <summary> /// Determines whether this IKMappingLimb is valid /// </summary> public override bool IsValid(IKSolver solver, Warning.Logger logger = null) { if (!base.IsValid(solver, logger)) { return(false); } if (!BoneIsValid(bone1, solver, logger)) { return(false); } if (!BoneIsValid(bone2, solver, logger)) { return(false); } if (!BoneIsValid(bone3, solver, logger)) { return(false); } return(true); }
/// <summary> /// Determines whether this IKConstraintBend is valid. /// </summary> public bool IsValid(IKSolverFullBody solver, Warning.Logger logger) { if (bone1 == null || bone2 == null || bone3 == null) { if (logger != null) { logger("Bend Constraint contains a null reference."); } return(false); } if (solver.GetPoint(bone1) == null) { if (logger != null) { logger("Bend Constraint is referencing to a bone '" + bone1.name + "' that does not excist in the Node Chain."); } return(false); } if (solver.GetPoint(bone2) == null) { if (logger != null) { logger("Bend Constraint is referencing to a bone '" + bone2.name + "' that does not excist in the Node Chain."); } return(false); } if (solver.GetPoint(bone3) == null) { if (logger != null) { logger("Bend Constraint is referencing to a bone '" + bone3.name + "' that does not excist in the Node Chain."); } return(false); } return(true); }
public override bool IsValid(IKSolver solver, Warning.Logger logger = null) { if (!base.IsValid(solver, logger)) { return(false); } Transform[] array = this.spineBones; for (int i = 0; i < array.Length; i++) { Transform x = array[i]; if (x == null) { if (logger != null) { logger("Spine bones contains a null reference."); } return(false); } } int num = 0; for (int j = 0; j < this.spineBones.Length; j++) { if (solver.GetPoint(this.spineBones[j]) != null) { num++; } } if (num == 0) { if (logger != null) { logger("IKMappingSpine does not contain any nodes."); } return(false); } if (this.leftUpperArmBone == null) { if (logger != null) { logger("IKMappingSpine is missing the left upper arm bone."); } return(false); } if (this.rightUpperArmBone == null) { if (logger != null) { logger("IKMappingSpine is missing the right upper arm bone."); } return(false); } if (this.leftThighBone == null) { if (logger != null) { logger("IKMappingSpine is missing the left thigh bone."); } return(false); } if (this.rightThighBone == null) { if (logger != null) { logger("IKMappingSpine is missing the right thigh bone."); } return(false); } if (solver.GetPoint(this.leftUpperArmBone) == null) { if (logger != null) { logger("Full Body IK is missing the left upper arm node."); } return(false); } if (solver.GetPoint(this.rightUpperArmBone) == null) { if (logger != null) { logger("Full Body IK is missing the right upper arm node."); } return(false); } if (solver.GetPoint(this.leftThighBone) == null) { if (logger != null) { logger("Full Body IK is missing the left thigh node."); } return(false); } if (solver.GetPoint(this.rightThighBone) == null) { if (logger != null) { logger("Full Body IK is missing the right thigh node."); } return(false); } return(true); }
} // 0x0000000180246DB0-0x0000000180246DC0 protected bool BoneIsValid(Transform bone, IKSolver solver, ref string message, Warning.Logger logger = null) => default; // 0x00000001809B5260-0x00000001809B5370
/* * Determines whether this IKEffector is valid or not. * */ public bool IsValid(IKSolver solver, Warning.Logger logger) { if (bone == null) { if (logger != null) { logger("IK Effector bone is null."); } return(false); } if (solver.GetPoint(bone) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + bone.name + "' that does not excist in the Node Chain."); } return(false); } foreach (Transform b in childBones) { if (b == null) { if (logger != null) { logger("IK Effector contains a null reference."); } return(false); } } foreach (Transform b in childBones) { if (solver.GetPoint(b) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + b.name + "' that does not excist in the Node Chain."); } return(false); } } if (planeBone1 != null && solver.GetPoint(planeBone1) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + planeBone1.name + "' that does not excist in the Node Chain."); } return(false); } if (planeBone2 != null && solver.GetPoint(planeBone2) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + planeBone2.name + "' that does not excist in the Node Chain."); } return(false); } if (planeBone3 != null && solver.GetPoint(planeBone3) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + planeBone3.name + "' that does not excist in the Node Chain."); } return(false); } return(true); }
public override bool IsValid(IKSolver solver, Warning.Logger logger = null) { return(base.IsValid(solver, logger) && base.BoneIsValid(this.bone1, solver, logger) && base.BoneIsValid(this.bone2, solver, logger) && base.BoneIsValid(this.bone3, solver, logger)); }
/// <summary> /// Determines whether this IKMappingSpine is valid /// </summary> public override bool IsValid(IKSolver solver, Warning.Logger logger = null) { if (!base.IsValid(solver, logger)) { return(false); } foreach (Transform spineBone in spineBones) { if (spineBone == null) { if (logger != null) { logger("Spine bones contains a null reference."); } return(false); } } int nodes = 0; for (int i = 0; i < spineBones.Length; i++) { if (solver.GetPoint(spineBones[i]) != null) { nodes++; } } if (nodes == 0) { if (logger != null) { logger("IKMappingSpine does not contain any nodes."); } return(false); } if (leftUpperArmBone == null) { if (logger != null) { logger("IKMappingSpine is missing the left upper arm bone."); } return(false); } if (rightUpperArmBone == null) { if (logger != null) { logger("IKMappingSpine is missing the right upper arm bone."); } return(false); } if (leftThighBone == null) { if (logger != null) { logger("IKMappingSpine is missing the left thigh bone."); } return(false); } if (rightThighBone == null) { if (logger != null) { logger("IKMappingSpine is missing the right thigh bone."); } return(false); } if (solver.GetPoint(leftUpperArmBone) == null) { if (logger != null) { logger("Full Body IK is missing the left upper arm node."); } return(false); } if (solver.GetPoint(rightUpperArmBone) == null) { if (logger != null) { logger("Full Body IK is missing the right upper arm node."); } return(false); } if (solver.GetPoint(leftThighBone) == null) { if (logger != null) { logger("Full Body IK is missing the left thigh node."); } return(false); } if (solver.GetPoint(rightThighBone) == null) { if (logger != null) { logger("Full Body IK is missing the right thigh node."); } return(false); } return(true); }
} // 0x00000001809AE540-0x00000001809AE610 // Methods public bool IsValid(IKSolverFullBody solver, Warning.Logger logger) => default; // 0x00000001809AD640-0x00000001809AD860
/// <summary> /// Determines whether this IKMapping is valid. /// </summary> public virtual bool IsValid(IKSolver solver, Warning.Logger logger = null) { return(true); }
public bool IsValid(IKSolver solver, Warning.Logger logger) { if (this.bone == null) { if (logger != null) { logger("IK Effector bone is null."); } return(false); } if (solver.GetPoint(this.bone) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + this.bone.name + "' that does not excist in the Node Chain."); } return(false); } Transform[] array = this.childBones; for (int i = 0; i < array.Length; i++) { Transform x = array[i]; if (x == null) { if (logger != null) { logger("IK Effector contains a null reference."); } return(false); } } Transform[] array2 = this.childBones; for (int j = 0; j < array2.Length; j++) { Transform transform = array2[j]; if (solver.GetPoint(transform) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + transform.name + "' that does not excist in the Node Chain."); } return(false); } } if (this.planeBone1 != null && solver.GetPoint(this.planeBone1) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + this.planeBone1.name + "' that does not excist in the Node Chain."); } return(false); } if (this.planeBone2 != null && solver.GetPoint(this.planeBone2) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + this.planeBone2.name + "' that does not excist in the Node Chain."); } return(false); } if (this.planeBone3 != null && solver.GetPoint(this.planeBone3) == null) { if (logger != null) { logger("IK Effector is referencing to a bone '" + this.planeBone3.name + "' that does not excist in the Node Chain."); } return(false); } return(true); }