示例#1
0
 public DisplacementPoint(Displacement parent, int x, int y)
 {
     Parent = parent;
     XIndex = x;
     YIndex = y;
     CurrentPosition = new Vertex(Coordinate.Zero, parent);
     InitialPosition = Coordinate.Zero;
     Displacement = new Vector(Coordinate.UnitZ, 0);
     OffsetDisplacement = new Vector(Coordinate.UnitZ, 0);
     Alpha = 0;
 }
示例#2
0
 private static void GLCoordinateTriangle(Vertex v1, Vertex v2, Vertex v3, bool texture)
 {
     var p1 = v1.Location.ToCoordinateF();
     var p2 = v2.Location.ToCoordinateF();
     var p3 = v3.Location.ToCoordinateF();
     var normal = (p3 - p1).Cross(p2 - p1).Normalise();
     GLCoordinate(v1, normal, texture);
     GLCoordinate(v2, normal, texture);
     GLCoordinate(v3, normal, texture);
 }
示例#3
0
 private static void GLCoordinate(Vertex v, Coordinate normal, bool texture)
 {
     if (texture)
     {
         GL.TexCoord2(v.DTextureU, v.DTextureV);
     }
     GL.Normal3(normal.DX, normal.DY, normal.DZ);
     GLCoordinate(v.Location);
 }
示例#4
0
 private static void GLCoordinate(Vertex v, CoordinateF normal)
 {
     GL.TexCoord2(v.DTextureU, v.DTextureV);
     GL.Normal3(normal.X, normal.Y, normal.Z);
     GLCoordinate(v.Location);
 }