forked from izrik/FbxSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFbxLayerElementArray.cs
142 lines (116 loc) · 2.84 KB
/
FbxLayerElementArray.cs
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
using System;
using System.Collections.Generic;
namespace FbxSharp
{
public class FbxLayerElementArray
{
public enum ELockMode
{
eReadLock = 1,
eWriteLock = 2,
eReadWriteLock = 3
}
public bool IsInUse()
{
throw new NotImplementedException();
}
public int ReadLock()
{
throw new NotImplementedException();
}
public int ReadUnlock()
{
throw new NotImplementedException();
}
public bool WriteLock()
{
throw new NotImplementedException();
}
public void WriteUnlock()
{
throw new NotImplementedException();
}
public bool ReadWriteLock()
{
throw new NotImplementedException();
}
public void ReadWriteUnlock()
{
throw new NotImplementedException();
}
}
public class LayerElementArrayT<T> : FbxLayerElementArray
{
public LayerElementArrayT(/*EFbxType pDataType*/)
{
}
readonly List<T> values = new List<T>();
public List<T> List
{
get { return values; }
}
public int Add(T pItem)
{
values.Add(pItem);
return values.Count - 1;
}
public int InsertAt(int pIndex, T pItem)
{
values.Insert(pIndex, pItem);
return pIndex;
}
public void SetAt(int pIndex, T pItem)
{
values[pIndex] = pItem;
}
public void SetLast(T pItem)
{
values[values.Count - 1] = pItem;
}
public T RemoveAt(int pIndex)
{
var item = values[pIndex];
values.RemoveAt(pIndex);
return item;
}
public T RemoveLast()
{
var item = GetLast();
values.RemoveAt(values.Count - 1);
return item;
}
public bool RemoveIt(T pItem)
{
return values.Remove(pItem);
}
public T GetAt(int pIndex)
{
return values[pIndex];
}
public T GetFirst()
{
return values[0];
}
public T GetLast()
{
return values[values.Count - 1];
}
public int Find(T pItem)
{
return values.IndexOf(pItem);
}
public int FindAfter(int pAfterIndex, T pItem)
{
throw new NotImplementedException();
}
public int FindBefore(int pBeforeIndex, T pItem)
{
throw new NotImplementedException();
}
public T this [int index]
{
get { return values[index]; }
set { values[index] = value; }
}
}
}