Пример #1
0
 public Material(String id, String fileName, uint GL_ID, Vector3f ambient, Vector3f diffuse, Vector3f specular)
 {
     this.id = id;
     this.fileName = fileName;
     this.GL_ID = GL_ID;
     this.ambient = ambient;
     this.diffuse = diffuse;
     this.specular = specular;
 }
Пример #2
0
 public Material(String id, String fileName, uint GL_ID)
 {
     this.id = id;
     this.fileName = fileName;
     this.GL_ID = GL_ID;
     ambient = new Vector3f();
     diffuse = new Vector3f();
     specular = new Vector3f();
 }
Пример #3
0
 /// <summary>
 /// Get the vertex vectors for this Triangle
 /// Note that the indices are read from and stored as 1-based indices but that OpenGL needs them as 0-based indices. This corrects that.
 /// </summary>
 /// <param name="vertexArray">The vertex array that holds coordinates for this Triangle</param> 
 /// <param name="vertexVector1">The vertex vector of the first coordinate.</param> 
 /// <param name="vertexVector2">The vertex vector of the second coordinate.</param> 
 /// <param name="vertexVector3">The vertex vector of the third coordinate.</param> 
 public void getVertices(List<Vector3f> vertexArray, out Vector3f vertexVector1, out Vector3f vertexVector2, out Vector3f vertexVector3)
 {
     vertexVector1 = vertexArray[vertex1 - 1];
     vertexVector2 = vertexArray[vertex2 - 1];
     vertexVector3 = vertexArray[vertex3 - 1];
 }
Пример #4
0
 /// <summary>
 /// Get the normal vectors for this Triangle.
 /// Note that the indices are read from and stored as 1-based indices but that OpenGL needs them as 0-based indices. This corrects that.
 /// </summary>
 /// <param name="normalArray">The normal array that holds coordinates for this Triangle</param> 
 /// <param name="normalVector1">The normal vector of the first coordinate.</param> 
 /// <param name="normalVector2">The normal vector of the second coordinate.</param> 
 /// <param name="normalVector3">The normal vector of the third coordinate.</param> 
 public void getNormals(List<Vector3f> normalArray, out Vector3f normalVector1, out Vector3f normalVector2, out Vector3f normalVector3)
 {
     normalVector1 = normalArray[normal1-1];
     normalVector2 = normalArray[normal2-1];
     normalVector3 = normalArray[normal3-1];
 }