30 using OpenSim.Region.Framework.Scenes;
32 namespace OpenSim.
Region.OptionalModules.Scripting.Minimodule
36 private readonly
int m_face;
42 this.m_parent = m_parent;
49 Color4 res = GetTexface().RGBA;
50 return Color.FromArgb((int) (res.A*255), (int) (res.R*255), (int) (res.G*255), (int) (res.B*255));
54 Primitive.TextureEntry tex = m_parent.Shape.Textures;
55 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
56 texface.RGBA =
new Color4(value.R,value.G,value.B,value.A);
57 tex.FaceTextures[m_face] = texface;
58 m_parent.UpdateTextureEntry(tex.GetBytes());
66 Primitive.TextureEntryFace texface = GetTexface();
67 return texface.TextureID;
71 Primitive.TextureEntry tex = m_parent.Shape.Textures;
72 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
73 texface.TextureID = value;
74 tex.FaceTextures[m_face] = texface;
75 m_parent.UpdateTextureEntry(tex.GetBytes());
79 private Primitive.TextureEntryFace GetTexface()
81 Primitive.TextureEntry tex = m_parent.Shape.Textures;
82 return tex.GetFace((uint)m_face);
87 get {
throw new System.NotImplementedException(); }
88 set {
throw new System.NotImplementedException(); }
93 get {
return GetTexface().Fullbright; }
96 Primitive.TextureEntry tex = m_parent.Shape.Textures;
97 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
98 texface.Fullbright = value;
99 tex.FaceTextures[m_face] = texface;
100 m_parent.UpdateTextureEntry(tex.GetBytes());
106 get {
return GetTexface().Glow; }
109 Primitive.TextureEntry tex = m_parent.Shape.Textures;
110 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
111 texface.Glow = (float) value;
112 tex.FaceTextures[m_face] = texface;
113 m_parent.UpdateTextureEntry(tex.GetBytes());
119 get {
return GetTexface().Shiny != Shininess.None; }
122 Primitive.TextureEntry tex = m_parent.Shape.Textures;
123 Primitive.TextureEntryFace texface = tex.CreateFace((uint)m_face);
124 texface.Shiny = value ? Shininess.High : Shininess.None;
125 tex.FaceTextures[m_face] = texface;
126 m_parent.UpdateTextureEntry(tex.GetBytes());
132 get {
return GetTexface().Bump == Bumpiness.None; }
133 set {
throw new System.NotImplementedException(); }
SOPObjectMaterial(int m_face, SceneObjectPart m_parent)