Ejemplo n.º 1
0
        internal Matrix4x4 GetPostApplyMatrix(ElementGroup group)
        {
            switch (pivotPoint)
            {
            case PivotPoint.Center:
                return(Matrix4x4.TRS(handlePositionOrigin, handleRotationOrigin, Vector3.one));

            case PivotPoint.ActiveElement:
                return(Matrix4x4.TRS(handlePositionOrigin, handleRotationOrigin, Vector3.one));

            case PivotPoint.IndividualOrigins:
                return(Matrix4x4.TRS(group.position, group.rotation, Vector3.one));

            default:
                return(Matrix4x4.identity);
            }
        }
 public MeshAndElementSelection(ProBuilderMesh mesh, PivotPoint pivot, HandleOrientation orientation, bool collectCoincidentIndices)
 {
     m_Mesh          = mesh;
     m_ElementGroups = ElementGroup.GetElementGroups(mesh, pivot, orientation, collectCoincidentIndices);
 }
 public MeshAndElementSelection(ProBuilderMesh mesh, bool collectCoincidentIndices)
 {
     m_Mesh          = mesh;
     m_ElementGroups = ElementGroup.GetElementGroups(mesh, collectCoincidentIndices);
 }