Пример #1
0
 public Cube(Ratchet.Math.vec3 Position, float Size)
 {
     _1 = new Quad3(new Ratchet.Math.vec3(Position.x, Position.y, Position.z), new Ratchet.Math.vec3(Position.x + Size, Position.y, Position.z), new Ratchet.Math.vec3(Position.x + Size, Position.y, Position.z + Size), new Ratchet.Math.vec3(Position.x, Position.y, Position.z + Size));
     _2 = new Quad3(new Ratchet.Math.vec3(Position.x, Position.y + Size, Position.z), new Ratchet.Math.vec3(Position.x + Size, Position.y + Size, Position.z), new Ratchet.Math.vec3(Position.x + Size, Position.y + Size, Position.z + Size), new Ratchet.Math.vec3(Position.x, Position.y + Size, Position.z + Size));
     _3 = new Quad3(new Ratchet.Math.vec3(Position.x, Position.y, Position.z), new Ratchet.Math.vec3(Position.x, Position.y + Size, Position.z), new Ratchet.Math.vec3(Position.x + Size, Position.y + Size, Position.z), new Ratchet.Math.vec3(Position.x + Size, Position.y, Position.z));
     _4 = new Quad3(new Ratchet.Math.vec3(Position.x, Position.y, Position.z + Size), new Ratchet.Math.vec3(Position.x, Position.y, Position.z + Size), new Ratchet.Math.vec3(Position.x + Size, Position.y + Size, Position.z + Size), new Ratchet.Math.vec3(Position.x + Size, Position.y, Position.z + Size));
     _5 = new Quad3(new Ratchet.Math.vec3(Position.x, Position.y, Position.z), new Ratchet.Math.vec3(Position.x, Position.y + Size, Position.z), new Ratchet.Math.vec3(Position.x, Position.y + Size, Position.z + Size), new Ratchet.Math.vec3(Position.x, Position.y, Position.z + Size));
     _6 = new Quad3(new Ratchet.Math.vec3(Position.x + Size, Position.y, Position.z), new Ratchet.Math.vec3(Position.x + Size, Position.y + Size, Position.z), new Ratchet.Math.vec3(Position.x + Size, Position.y + Size, Position.z + Size), new Ratchet.Math.vec3(Position.x + Size, Position.y, Position.z + Size));
 }
Пример #2
0
 private void update_Tick(object sender, EventArgs e)
 {
     angle          += 0.05;
     _CameraPosition = new Ratchet.Math.vec3((float)Math.Cos(angle) * 2.5f, 2.0f, (float)Math.Sin(angle) * 2.5f);
 }
Пример #3
0
 public Triangle3(Ratchet.Math.vec3 p1, Ratchet.Math.vec3 p2, Ratchet.Math.vec3 p3)
 {
     this.p1 = new Ratchet.Math.vec4(p1, 1.0f);
     this.p2 = new Ratchet.Math.vec4(p2, 1.0f);
     this.p3 = new Ratchet.Math.vec4(p3, 1.0f);
 }
Пример #4
0
 public Quad3(Ratchet.Math.vec3 p1, Ratchet.Math.vec3 p2, Ratchet.Math.vec3 p3, Ratchet.Math.vec3 p4)
 {
     t1 = new Triangle3(p1, p2, p3);
     t2 = new Triangle3(p1, p3, p4);
 }