/[gr2lib]/trunk/gr2lib/core/coretypes/implementation/Map.cs
ViewVC logotype

Contents of /trunk/gr2lib/core/coretypes/implementation/Map.cs

Parent Directory Parent Directory | Revision Log Revision Log


Revision 80 - (show annotations) (download)
Thu Jul 15 22:18:17 2010 UTC (11 years, 4 months ago) by william
File size: 1508 byte(s)
fix issue with Lists, and add IsTexture to Material class (non-texture materials have a null texture)

1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using gr2lib.core.helpers;
6 using gr2lib.core.interfaces;
7 namespace gr2lib.core.coretypes.implementation
8 {
9 public class Map : IMap
10 {
11 public Map()
12 {
13 this.NativePointer = IntPtr.Zero;
14 this.Usage = "";
15 this.MapPointer = IntPtr.Zero;
16 }
17 internal static Map ReadFromMemory(IntPtr pointer)
18 {
19 if (pointer == IntPtr.Zero) return null;
20 native.Map native = Helpers.ReadFromMemory<native.Map>(pointer);
21 Map managed = ReadFromNative(native);
22 managed.NativePointer = pointer;
23 return managed;
24 }
25
26 internal static Map ReadFromNative(native.Map native)
27 {
28 Map managed = new Map();
29 managed.Usage = native.Usage;
30 managed.MapPointer = native.MapPointer;
31 return managed;
32 }
33
34 #region INativePointer Members
35 private IntPtr _NativePointer;
36 public IntPtr NativePointer { get { return _NativePointer; } set { _NativePointer = value; } }
37 #endregion
38
39 #region IMap Members
40 private string _Usage;
41 private IntPtr _MapPointer;
42
43 public string Usage { get { return _Usage; } set { _Usage = value; } }
44 public IntPtr MapPointer { get { return _MapPointer; } set { _MapPointer = value; } }
45 #endregion
46 }
47 }

  ViewVC Help
Powered by ViewVC 1.1.22