Beispiel #1
0
        //개선된 버전 19.5.23
        public void Link(apOptModifiedMesh_Physics modMeshPhysics,
                         apOptModifiedMeshSet modMeshSet,
                         apOptTransform optTransform,
                         apOptRenderVertex vertex)
        {
            //>>19.5.23 : 삭제 (불필요)
            //_modifiedMesh = modifiedMesh;
            //_mesh = mesh;
            _vertex       = vertex;
            _optTransform = optTransform;

            if (_linkedVertices == null)
            {
                _linkedVertices = new List <LinkedVertex>();
            }


            apOptMesh mesh = modMeshSet._targetMesh;

            //이미 Bake 되었으므로 바로 Link하면 된다.
            for (int i = 0; i < _linkedVertices.Count; i++)
            {
                LinkedVertex               linkedVert = _linkedVertices[i];
                apOptRenderVertex          renderVert = mesh.RenderVertices[linkedVert._vertIndex];
                apOptModifiedPhysicsVertex linkVert   = modMeshSet.SubModMesh_Physics._vertWeights[linkedVert._vertIndex];
                linkedVert.Link(renderVert, linkVert);
            }

            DampPhysicVertex();
        }
Beispiel #2
0
        // Link
        //---------------------------------------------------------------------------------
        public void Link(apPortrait portrait)
        {
            _portrait = portrait;

            if (IsVertex)
            {
                apOptModifiedMesh_Vertex sub_Vertex = SubModMesh_Vertex;
                if (sub_Vertex != null)
                {
                    sub_Vertex.Link(this);
                }
            }

            if (IsTransform)
            {
                apOptModifiedMesh_Transform sub_Transform = SubModMesh_Transform;
                if (sub_Transform != null)
                {
                    sub_Transform.Link(this);
                }
            }

            if (IsRigging)
            {
                apOptModifiedMesh_VertexRig sub_Rigging = SubModMesh_Rigging;
                if (sub_Rigging != null)
                {
                    sub_Rigging.Link(portrait, this);
                }
            }

            if (IsPhysics)
            {
                apOptModifiedMesh_Physics sub_Physics = SubModMesh_Physics;
                if (sub_Physics != null)
                {
                    sub_Physics.Link(portrait, this);
                }
            }

            if (IsColor)
            {
                apOptModifiedMesh_Color sub_Color = SubModMesh_Color;
                if (sub_Color != null)
                {
                    sub_Color.Link(this);
                }
            }

            if (IsExtra)
            {
                apOptModifiedMesh_Extra sub_Extra = SubModMesh_Extra;
                if (sub_Extra != null)
                {
                    sub_Extra.Link(portrait, this);
                }
            }
        }
Beispiel #3
0
        public void Bake_Physics(apPhysicsMeshParam srcPhysicParam, List <apModifiedVertexWeight> modVertWeights, apPortrait portrait)
        {
            _dataType |= DATA_TYPE.Physics;

            _subModMesh_Physics    = new apOptModifiedMesh_Physics[1];
            _subModMesh_Physics[0] = new apOptModifiedMesh_Physics();
            apOptModifiedMesh_Physics subMod_Physics = _subModMesh_Physics[0];

            subMod_Physics.Bake(srcPhysicParam, modVertWeights, portrait);
        }