aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs176
1 files changed, 88 insertions, 88 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
index 57d84e1..63fd31e 100644
--- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectMaterial.cs
@@ -1,88 +1,88 @@
1using System.Drawing; 1using System.Drawing;
2using OpenMetaverse; 2using OpenMetaverse;
3using OpenSim.Region.Framework.Scenes; 3using OpenSim.Region.Framework.Scenes;
4 4
5namespace OpenSim.Region.OptionalModules.Scripting.Minimodule 5namespace OpenSim.Region.OptionalModules.Scripting.Minimodule
6{ 6{
7 class SOPObjectMaterial : IObjectMaterial 7 class SOPObjectMaterial : IObjectMaterial
8 { 8 {
9 private readonly int m_face; 9 private readonly int m_face;
10 private readonly SceneObjectPart m_parent; 10 private readonly SceneObjectPart m_parent;
11 11
12 public SOPObjectMaterial(int m_face, SceneObjectPart m_parent) 12 public SOPObjectMaterial(int m_face, SceneObjectPart m_parent)
13 { 13 {
14 this.m_face = m_face; 14 this.m_face = m_face;
15 this.m_parent = m_parent; 15 this.m_parent = m_parent;
16 } 16 }
17 17
18 public Color Color 18 public Color Color
19 { 19 {
20 get 20 get
21 { 21 {
22 Color4 res = GetTexface().RGBA; 22 Color4 res = GetTexface().RGBA;
23 return Color.FromArgb((int) (res.A*255), (int) (res.R*255), (int) (res.G*255), (int) (res.B*255)); 23 return Color.FromArgb((int) (res.A*255), (int) (res.R*255), (int) (res.G*255), (int) (res.B*255));
24 } 24 }
25 set 25 set
26 { 26 {
27 Primitive.TextureEntry tex = m_parent.Shape.Textures; 27 Primitive.TextureEntry tex = m_parent.Shape.Textures;
28 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); 28 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
29 texface.RGBA = new Color4(value.R,value.G,value.B,value.A); 29 texface.RGBA = new Color4(value.R,value.G,value.B,value.A);
30 tex.FaceTextures[m_face] = texface; 30 tex.FaceTextures[m_face] = texface;
31 m_parent.UpdateTexture(tex); 31 m_parent.UpdateTexture(tex);
32 } 32 }
33 } 33 }
34 34
35 public UUID Texture 35 public UUID Texture
36 { 36 {
37 get 37 get
38 { 38 {
39 Primitive.TextureEntryFace texface = GetTexface(); 39 Primitive.TextureEntryFace texface = GetTexface();
40 return texface.TextureID; 40 return texface.TextureID;
41 } 41 }
42 set 42 set
43 { 43 {
44 Primitive.TextureEntry tex = m_parent.Shape.Textures; 44 Primitive.TextureEntry tex = m_parent.Shape.Textures;
45 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face); 45 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
46 texface.TextureID = value; 46 texface.TextureID = value;
47 tex.FaceTextures[m_face] = texface; 47 tex.FaceTextures[m_face] = texface;
48 m_parent.UpdateTexture(tex); 48 m_parent.UpdateTexture(tex);
49 } 49 }
50 } 50 }
51 51
52 private Primitive.TextureEntryFace GetTexface() 52 private Primitive.TextureEntryFace GetTexface()
53 { 53 {
54 Primitive.TextureEntry tex = m_parent.Shape.Textures; 54 Primitive.TextureEntry tex = m_parent.Shape.Textures;
55 return tex.GetFace((uint)m_face); 55 return tex.GetFace((uint)m_face);
56 } 56 }
57 57
58 public TextureMapping Mapping 58 public TextureMapping Mapping
59 { 59 {
60 get { throw new System.NotImplementedException(); } 60 get { throw new System.NotImplementedException(); }
61 set { throw new System.NotImplementedException(); } 61 set { throw new System.NotImplementedException(); }
62 } 62 }
63 63
64 public bool Bright 64 public bool Bright
65 { 65 {
66 get { return GetTexface().Fullbright; } 66 get { return GetTexface().Fullbright; }
67 set { throw new System.NotImplementedException(); } 67 set { throw new System.NotImplementedException(); }
68 } 68 }
69 69
70 public double Bloom 70 public double Bloom
71 { 71 {
72 get { return GetTexface().Glow; } 72 get { return GetTexface().Glow; }
73 set { throw new System.NotImplementedException(); } 73 set { throw new System.NotImplementedException(); }
74 } 74 }
75 75
76 public bool Shiny 76 public bool Shiny
77 { 77 {
78 get { return GetTexface().Shiny != Shininess.None; } 78 get { return GetTexface().Shiny != Shininess.None; }
79 set { throw new System.NotImplementedException(); } 79 set { throw new System.NotImplementedException(); }
80 } 80 }
81 81
82 public bool BumpMap 82 public bool BumpMap
83 { 83 {
84 get { throw new System.NotImplementedException(); } 84 get { throw new System.NotImplementedException(); }
85 set { throw new System.NotImplementedException(); } 85 set { throw new System.NotImplementedException(); }
86 } 86 }
87 } 87 }
88} 88}