Skip to content

[Feature Request] Add Flip State Detection for IModel Interface #30

@Dreamtowards

Description

@Dreamtowards

Description

I would like to request a new feature to detect the flip state of models along each axis. Currently, the VoxReader library does not provide a straightforward way to determine if an IModel is flipped on the X, Y, or Z axis, which is important information stored in MagicaVoxel files.

Problem

When working with MagicaVoxel models, the flip state along each axis is a crucial property for proper rendering and transformation. However, the current IModel interface lacks properties to access this information.

Proposed Solution

Add a new property to the IModel interface to represent the flip state:

public interface IModel
{
    // Existing properties...
    Vector3Bool IsFlipped { get; } // New property
}

// Supporting structure
public struct Vector3Bool
{
    public bool X { get; set; }
    public bool Y { get; set; }
    public bool Z { get; set; }
    
    public Vector3Bool(bool x, bool y, bool z)
    {
        X = x;
        Y = y;
        Z = z;
    }
}

Additional Context

In MagicaVoxel, the flip state is represented in the model properties as shown in this screenshot:
Image

Use Case

This feature would be essential for:

  • Properly resolve flipped models in 3D applications
  • Maintaining accurate transformation data when exporting to other formats
  • Ensuring consistency with MagicaVoxel's behavior

Thank you for considering this feature request! Your library has been incredibly helpful for voxel-related development.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureNew feature or requestquestionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions