| | | 1 | | namespace JeremyAnsel.Media.WavefrontObj; |
| | | 2 | | |
| | | 3 | | /// <summary> |
| | | 4 | | /// Settings to control the behaviour of the <see cref="ObjFileReader" /> |
| | | 5 | | /// </summary> |
| | | 6 | | public class ObjFileReaderSettings |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Default settings |
| | | 10 | | /// </summary> |
| | 4 | 11 | | public static readonly ObjFileReaderSettings Default = new(); |
| | | 12 | | |
| | | 13 | | /// <summary> |
| | | 14 | | /// Object names normally not interpreted as a <see cref="ObjGroup" /> |
| | | 15 | | /// If this flag is set to true, object names are handled as a group. |
| | | 16 | | /// </summary> |
| | | 17 | | /// <remarks> |
| | | 18 | | /// This flag should be set to true, when object files should be interpreted like other libraries like three.js |
| | | 19 | | /// </remarks> |
| | 4 | 20 | | public bool HandleObjectNamesAsGroup { get; set; } = false; |
| | | 21 | | |
| | | 22 | | /// <summary> |
| | | 23 | | /// Normally multiple group names are valid per line e.g. "g group_name1 group_name1" |
| | | 24 | | /// If this flag is set to true, all after the g will be interpreted as a single group name |
| | | 25 | | /// </summary> |
| | | 26 | | /// <remarks> |
| | | 27 | | /// This flag should be set to true, when object files should be interpreted like other libraries like three.js |
| | | 28 | | /// </remarks> |
| | 4 | 29 | | public bool OnlyOneGroupNamePerLine { get; set; } = false; |
| | | 30 | | |
| | | 31 | | /// <summary> |
| | | 32 | | /// Normally whitespaces removed during import e.g. "mtllib wl file 5.mtl" changed to "mtllib wl file 5.mtl" |
| | | 33 | | /// If this flag is set to true, all after the mtllib will be interpreted as a single mtllib reference |
| | | 34 | | /// </summary> |
| | | 35 | | /// <remarks> |
| | | 36 | | /// This flag should be set to true, when object files should be interpreted like other libraries like three.js |
| | | 37 | | /// </remarks> |
| | 4 | 38 | | public bool KeepWhitespacesOfMtlLibReferences { get; set; } = false; |
| | | 39 | | |
| | | 40 | | /// <summary> |
| | | 41 | | /// Normally groups are reused when the group name is used multiple times. |
| | | 42 | | /// If this flag is set to true, all group occurrences are handled as a different and new group |
| | | 43 | | /// </summary> |
| | | 44 | | /// <remarks> |
| | | 45 | | /// This flag should be set to true, when groups should be interpreted like other libraries like three.js or tin |
| | | 46 | | /// The following example shows the difference between the default behavior and the behavior with this flag set |
| | | 47 | | /// g cube |
| | | 48 | | /// f 1 2 3 |
| | | 49 | | /// g other |
| | | 50 | | /// f 4 5 6 |
| | | 51 | | /// g cube |
| | | 52 | | /// f 7 8 9 |
| | | 53 | | /// When set to true: 3 groups are created (cube, other, cube) |
| | | 54 | | /// When set to false: 2 groups are created (cube, other). All faces of the second cube group are part of the fi |
| | | 55 | | /// cube group. |
| | | 56 | | /// </remarks> |
| | 4 | 57 | | public bool HandleEachGroupOccurrenceAsNewGroup { get; set; } = false; |
| | | 58 | | } |