// Init
        //--------------------------------------------------
        public apCalculatedResultParam(CALCULATED_VALUE_TYPE calculatedValueType,
                                       CALCULATED_SPACE calculatedSpace,
                                       apModifierBase linkedModifier,
                                       apRenderUnit targetRenderUnit,
                                       apRenderUnit ownerRenderUnit, //<<추가 10.2 : Modifier를 가지고 있었던 RenderUnit
                                       apBone targetBone
                                                                     //apModifierParamSetGroupVertWeight weightedVertData//삭제 19.5.20
                                       )
        {
            _calculatedValueType = calculatedValueType;
            _calculatedSpace     = calculatedSpace;

            _linkedModifier   = linkedModifier;
            _targetRenderUnit = targetRenderUnit;
            _ownerRenderUnit  = ownerRenderUnit;

            _targetBone = targetBone;

            //삭제 19.5.20 : _weightedVertexData 변수 삭제됨
            //_weightedVertexData = weightedVertData;

            //처리 타입이 Vertex 계열이면 Vertex List를 준비해야한다.
            if ((int)(_calculatedValueType & CALCULATED_VALUE_TYPE.VertexPos) != 0)
            {
                int nPos = 0;
                if (_targetRenderUnit._meshTransform != null && _targetRenderUnit._meshTransform._mesh != null)
                {
                    nPos = _targetRenderUnit._meshTransform._mesh._vertexData.Count;
                }

                _result_Positions = new Vector2[nPos];
                //_tmp_Positions = new List<Vector2>();
                for (int i = 0; i < nPos; i++)
                {
                    _result_Positions[i] = Vector2.zero;
                    //_tmp_Positions.Add(Vector2.zero);
                }

                //추가 : 만약 리깅타입이면 Vertex 개수만큼의 Matrix를 만들어야 한다.
                if (_linkedModifier.ModifierType == apModifierBase.MODIFIER_TYPE.Rigging)
                {
                    _result_VertMatrices = new apMatrix3x3[nPos];
                    for (int i = 0; i < nPos; i++)
                    {
                        _result_VertMatrices[i] = apMatrix3x3.zero;
                    }
                }
            }

            _debugID = UnityEngine.Random.Range(0, 10000);
        }
Ejemplo n.º 2
0
        // Init
        //--------------------------------------------------
        public apCalculatedResultParam(CALCULATED_VALUE_TYPE calculatedValueType,
                                       CALCULATED_SPACE calculatedSpace,
                                       apModifierBase linkedModifier,
                                       apRenderUnit targetRenderUnit,
                                       apBone targetBone,                                         //<<추가
                                       apModifierParamSetGroupVertWeight weightedVertData)
        {
            _calculatedValueType = calculatedValueType;
            _calculatedSpace     = calculatedSpace;

            _linkedModifier   = linkedModifier;
            _targetRenderUnit = targetRenderUnit;
            _targetBone       = targetBone;      //<추가

            _weightedVertexData = weightedVertData;

            //처리 타입이 Vertex 계열이면 Vertex List를 준비해야한다.
            if ((int)(_calculatedValueType & CALCULATED_VALUE_TYPE.VertexPos) != 0)
            {
                int nPos = 0;
                if (_targetRenderUnit._meshTransform != null && _targetRenderUnit._meshTransform._mesh != null)
                {
                    nPos = _targetRenderUnit._meshTransform._mesh._vertexData.Count;
                }

                _result_Positions = new List <Vector2>();
                //_tmp_Positions = new List<Vector2>();
                for (int i = 0; i < nPos; i++)
                {
                    _result_Positions.Add(Vector2.zero);
                    //_tmp_Positions.Add(Vector2.zero);
                }
            }

            _debugID = UnityEngine.Random.Range(0, 10000);
        }