public TriangleMesh(Transform o2w, Transform w2o, bool ro, int nt,
                     int nv, int[] vi, Point[] P, Normal[] N,
                      Vector[] S, float[] uv, Texture<float> atex)
     : base(o2w, w2o, ro)
 {
     alphaTexture = atex;
     ntris = nt;
     nverts = nv;
     MathHelper.Copy<int>(ref vertexIndex, ref vi);
     if (uv != null)
     {
         MathHelper.Copy<float>(ref uvs, ref uv);
     }
     else
         uvs = null;
     if (N != null)
     {
         MathHelper.Copy<Normal>(ref n, ref N);
     }
     else n = null;
     if (S != null)
     {
         MathHelper.Copy<Vector>(ref s, ref S);
     }
     else s = null;
     for (int i = 0; i < nverts; ++i)
         p[i] = (ObjectToWorld)[P[i]];
 }
Exemple #2
0
 public void SetCD(Texture c)
 {
     ambient.Texture = diffuse.Texture = c;
 }
Exemple #3
0
 public SV_Matte(float ka, float kd, Texture texture)
 {
     SetKA(ka);
     SetKD(kd);
     SetCD(texture);
 }
Exemple #4
0
 public void SetSpecularColor(Texture c)
 {
     specular.SpecularTexture = c;
 }
 public void SetReflectiveTexture(Texture t)
 {
     reflective.SetTexture(t);
 }
Exemple #6
0
 public void SetTexture(Texture tex)
 {
     t = tex;
 }
 public void SetTexture(Texture c)
 {
     reflective_brdf.SetTexture(c);
 }
 public void SetTexture(Texture c)
 {
     cr = c;
 }
 public void SetTextures(Texture t1, Texture t2)
 {
     texture1 = t1;
     texture2 = t2;
 }