SA.FullBodyIK.BodyIK.SolverInternal._PrepareLimbRotation C# (CSharp) Method

_PrepareLimbRotation() public method

public _PrepareLimbRotation ( Limb limb, int i, int origIndex, Vector3 &beginPos ) : bool
limb Limb
i int
origIndex int
beginPos UnityEngine.Vector3
return bool
				public bool _PrepareLimbRotation( Limb limb, int i, int origIndex, ref Vector3 beginPos )
				{
					Assert( i < 2 );
					this.origTheta[i] = 0.0f;
					this.origAxis[i] = new Vector3( 0.0f, 0.0f, 1.0f );

					if( !limb.targetBeginPosEnabled[i] ) {
						return false;
					}

					// Memo: limb index = orig index.

					var targetBeginPos = limb.targetBeginPos;

					Vector3 origPos = (origIndex == -1) ? this.centerLegPos : this.spinePos[origIndex];

					return _ComputeThetaAxis(
						ref origPos,
						ref beginPos,
						ref targetBeginPos[i],
						out this.origTheta[i],
						out this.origAxis[i] );
				}