-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCplx.Component.cs
More file actions
55 lines (49 loc) · 1.39 KB
/
Copy pathCplx.Component.cs
File metadata and controls
55 lines (49 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
* Idmr.LfdReader.dll, Library file to read and write LFD resource files
* Copyright (C) 2009-2026 Michael Gaisser (mjgaisser@gmail.com)
* Licensed under the MPL v2.0 or later
*
* Full notice in help/Idmr.LfdReader.chm
* Version: 3.0
*/
/* CHANGE LOG
* v3.0, 260821
* [UPD] Indexers replaced with ReadOnlyCollection
* v2.1, 221030
* [UPD] Lods now has internal set
* v2.0, 210309
* [NEW] Created
*/
using System;
using System.Collections.ObjectModel;
namespace Idmr.LfdReader
{
public partial class Cplx : Resource
{
/// <summary>Represents a complete mesh object.</summary>
public class Component
{
/// <summary>Initialize the mesh with the specified number of Lods (levels of detail).</summary>
/// <param name="lodCount">The count to create.</param>
public Component(int lodCount)
{
Lod[] lods = new Lod[lodCount];
bool[] readOnly = new bool[lodCount];
for (int i = 0; i < lodCount; i++)
{
lods[i] = new Lod();
readOnly[i] = true;
}
Lods = Array.AsReadOnly(lods);
}
/// <summary>Gets the Lods.</summary>
public ReadOnlyCollection<Lod> Lods { get; internal set; }
}
/// <summary>Represents a single Level of Detail (LOD) mesh.</summary>
public class Lod : Crft.Lod
{
/// <summary>Gets the normal vectors for each vertex.</summary>
public ReadOnlyCollection<Vector16> VertexNormals { get; internal set; }
}
}
}