Exemplo n.º 1
0
    // This paints all triangles perpendicular to the input position
    // NOTE: This method requires you to call SetMesh first
    public void PaintPerpendicularAll(Vector3 position, float maxDistance, P3D_CoordType coord = P3D_CoordType.UV1)
    {
        if (CanMeshPaint == true)
        {
            position = transform.InverseTransformPoint(position);

            Paint(tree.FindPerpendicularAll(position, maxDistance), coord);
        }
    }
Exemplo n.º 2
0
    // This will paint the nearest surface perpendicular to the position within maxDistance in world space
    public void PaintPerpendicularAll(P3D_Brush brush, Vector3 position, float maxDistance, int groupMask = -1)
    {
        if (CheckTree() == true)
        {
            var uniformScale = P3D_Helper.GetUniformScale(transform);

            if (uniformScale != 0.0f)
            {
                var point   = transform.InverseTransformPoint(position);
                var results = tree.FindPerpendicularAll(point, maxDistance / uniformScale);

                Paint(brush, results, groupMask);
            }
        }
    }