protected override void ComputeTF( out Vector3 LocPos, out Vector3 LocScale, out Quaternion LocRot) { base.ComputeTF(out LocPos, out LocScale, out LocRot); CheckID2D(); int cntPerRow = _pxId2D.GetCountPerRow(); Vector2Int cr = _pxId2D.GetColRow(); int thetaStepNum = cntPerRow; int radiusStepNum = cr.y; float thetaStep = _MaxAngle / (float)thetaStepNum; float radiusStep = _RadiusStep; float theta = cr.x * thetaStep; float radius = cr.y * radiusStep + _MinRadius; LocPos = ComputeLocPos(theta, radius); // print("theta:" + theta.ToString() + // " radius:" + radius.ToString()); LocScale = ComputeLocScale(radius); LocRot = ComputeLocRot(theta); }
protected override void ComputeTF( out Vector3 LocPos, out Vector3 LocScale, out Quaternion LocRot) { base.ComputeTF(out LocPos, out LocScale, out LocRot); CheckID2D(); Vector2Int cr = _pxId2D.GetColRow(); LocPos = _Origin + cr.x * _XUnitVector + cr.y * _YUnitVector; }
protected override string _Name() { PXId2D id2D = GetComponent <PXId2D>(); if (id2D == null) { return(base._Name()); } Vector2Int cr = id2D.GetColRow(); string newName = cr.ToString(); return(newName); }