public static F3DEXTriangleWrapper GetTriangleWrapper(F3DEX_G_Tri1 triangle) { if (_triangleWrappers.ContainsKey(triangle)) return _triangleWrappers[triangle]; F3DEXTriangleWrapper wrapper = new F3DEXTriangleWrapper(triangle); _triangleWrappers.Add(triangle, wrapper); return wrapper; }
public static F3DEXTriangleWrapper GetTriangleWrapper(F3DEX_G_Tri2 triangle, int index) { Dictionary<F3DEX_G_Tri2, F3DEXTriangleWrapper> wrappers; if (index % 2 == 1) wrappers = _triangle2FirstWrappers; else wrappers = _triangle2SecondWrappers; if (wrappers.ContainsKey(triangle)) return wrappers[triangle]; F3DEXTriangleWrapper wrapper = new F3DEXTriangleWrapper(triangle, index); wrappers.Add(triangle, wrapper); return wrapper; }