예제 #1
0
        static bool GenerateBox(ref BrushMesh brushMesh, ref ChiselBoxDefinition definition)
        {
            definition.Validate();

            var min = definition.min;
            var max = definition.max;

            if (!BoundsExtensions.IsValid(min, max))
            {
                brushMesh.Clear();
                return(false);
            }

            return(GenerateBox(ref brushMesh, definition.min, definition.max, definition.surfaceDefinition));
        }
예제 #2
0
        public static bool GenerateBox(ref ChiselBrushContainer brushContainer, ref ChiselBoxDefinition definition)
        {
            definition.Validate();

            var min = definition.min;
            var max = definition.max;

            if (!BoundsExtensions.IsValid(min, max))
            {
                return(false);
            }

            brushContainer.EnsureSize(1);

            return(GenerateBox(ref brushContainer.brushMeshes[0], definition.min, definition.max, definition.surfaceDefinition));
        }