Advertisement
Guest User

CopperLicht::SphereSceneNode

a guest
Jan 2nd, 2012
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CL3D.SphereSceneNode = function (e) {
  2.     if (e == null) {
  3.         e = 10
  4.     }
  5.     this.OwnedMesh = new CL3D.Mesh();
  6.     var c = new CL3D.MeshBuffer();
  7.     c.Indices = [4,2,0,1,3,5,8,4,6,7,5,9,12,8,10,11,9,13,16,12,14,15,13,17,20,16,18,19,17,21,24,20,22,23,21,25,28,24,26,27,25,29,32,28,30,31,29,33,36,32,34,35,33,37,40,36,38,39,37,41,44,40,42,43,41,45,48,44,46,47,45,49,52,48,50,51,49,53,56,52,54,55,53,57,60,56,58,59,57,61,64,60,62,63,61,65,66,2,4,66,4,67,68,66,67,68,67,69,70,68,69,70,69,71,72,70,71,72,71,73,74,72,73,74,73,75,3,74,75,3,75,5,67,4,8,67,8,76,69,67,76,69,76,77,71,69,77,71,77,78,73,71,78,73,78,79,75,73,79,75,79,80,5,75,80,5,80,9,76,8,12,76,12,81,77,76,81,77,81,82,78,77,82,78,82,83,79,78,83,79,83,84,80,79,84,80,84,85,9,80,85,9,85,13,81,12,16,81,16,86,82,81,86,82,86,87,83,82,87,83,87,88,84,83,88,84,88,89,85,84,89,85,89,90,13,85,90,13,90,17,86,16,20,86,20,91,87,86,91,87,91,92,88,87,92,88,92,93,89,88,93,89,93,94,90,89,94,90,94,95,17,90,95,17,95,21,91,20,24,91,24,96,92,91,96,92,96,97,93,92,97,93,97,98,94,93,98,94,98,99,95,94,99,95,99,100,21,95,100,21,100,25,96,24,28,96,28,101,97,96,101,97,101,102,98,97,102,98,102,103,99,98,103,99,103,104,100,99,104,100,104,105,25,100,105,25,105,29,101,28,32,101,32,106,102,101,106,102,106,107,103,102,107,103,107,108,104,103,108,104,108,109,105,104,109,105,109,110,29,105,110,29,110,33,106,32,36,106,36,111,107,106,111,107,111,112,108,107,112,108,112,113,109,108,113,109,113,114,110,109,114,110,114,115,33,110,115,33,115,37,111,36,40,111,40,116,112,111,116,112,116,117,113,112,117,113,117,118,114,113,118,114,118,119,115,114,119,115,119,120,37,115,120,37,120,41,116,40,44,116,44,121,117,116,121,117,121,122,118,117,122,118,122,123,119,118,123,119,123,124,120,119,124,120,124,125,41,120,125,41,125,45,121,44,48,121,48,126,122,121,126,122,126,127,123,122,127,123,127,128,124,123,128,124,128,129,125,124,129,125,129,130,45,125,130,45,130,49,126,48,52,126,52,131,127,126,131,127,131,132,128,127,132,128,132,133,129,128,133,129,133,134,130,129,134,130,134,135,49,130,135,49,135,53,131,52,56,131,56,136,132,131,136,132,136,137,133,132,137,133,137,138,134,133,138,134,138,139,135,134,139,135,139,140,53,135,140,53,140,57,136,56,60,136,60,141,137,136,141,137,141,142,138,137,142,138,142,143,139,138,143,139,143,144,140,139,144,140,144,145,57,140,145,57,145,61,141,60,64,141,64,146,142,141,146,142,146,147,143,142,147,143,147,148,144,143,148,144,148,149,145,144,149,145,149,150,61,145,150,61,150,65];
  8.  
  9.  
  10.     this.OwnedMesh.AddMeshBuffer(c);
  11.     var b = CL3D.createColor(255, 255, 255, 255);
  12.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, 0.00, 0.97, 0.00, b, 0.95, 0.00));
  13.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, 0.00, -0.98, 0.00, b, 0.95, 1.00));
  14.     c.Vertices.push(this.createVertex(0.50, 0.95, 0.29, 0.00, 0.88, 0.38, b, 1.00, 0.11));
  15.     c.Vertices.push(this.createVertex(0.50, 0.02, 0.29, 0.03, -0.88, 0.40, b, 1.00, 0.87));
  16.     c.Vertices.push(this.createVertex(0.56, 0.95, 0.31, 0.12, 0.87, 0.37, b, 0.93, 0.11));
  17.     c.Vertices.push(this.createVertex(0.56, 0.02, 0.31, 0.17, -0.88, 0.35, b, 0.93, 0.87));
  18.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, 0.00, 0.97, 0.00, b, 0.89, 0.00));
  19.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, 0.00, -0.98, 0.00, b, 0.89, 1.00));
  20.     c.Vertices.push(this.createVertex(0.62, 0.95, 0.35, 0.26, 0.87, 0.29, b, 0.87, 0.11));
  21.     c.Vertices.push(this.createVertex(0.62, 0.02, 0.35, 0.29, -0.88, 0.26, b, 0.87, 0.87));
  22.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, 0.00, 0.97, 0.00, b, 0.83, 0.00));
  23.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, 0.00, -0.98, 0.00, b, 0.83, 1.00));
  24.     c.Vertices.push(this.createVertex(0.66, 0.95, 0.41, 0.35, 0.87, 0.17, b, 0.81, 0.11));
  25.     c.Vertices.push(this.createVertex(0.66, 0.02, 0.41, 0.37, -0.88, 0.12, b, 0.81, 0.87));
  26.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, 0.00, 0.97, 0.00, b, 0.77, 0.00));
  27.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, 0.00, -0.98, 0.00, b, 0.77, 1.00));
  28.     c.Vertices.push(this.createVertex(0.68, 0.95, 0.50, 0.39, 0.87, 0.01, b, 0.75, 0.11));
  29.     c.Vertices.push(this.createVertex(0.68, 0.02, 0.50, 0.39, -0.88, -0.02, b, 0.75, 0.87));
  30.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, 0.00, 0.97, -0.01, b, 0.70, 0.00));
  31.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, 0.00, -0.98, -0.00, b, 0.70, 1.00));
  32.     c.Vertices.push(this.createVertex(0.66, 0.95, 0.56, 0.37, 0.87, -0.14, b, 0.68, 0.11));
  33.     c.Vertices.push(this.createVertex(0.66, 0.02, 0.56, 0.35, -0.88, -0.17, b, 0.68, 0.87));
  34.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, 0.00, 0.97, -0.00, b, 0.64, 0.00));
  35.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, 0.00, -0.98, -0.00, b, 0.64, 1.00));
  36.     c.Vertices.push(this.createVertex(0.62, 0.95, 0.62, 0.29, 0.87, -0.28, b, 0.62, 0.11));
  37.     c.Vertices.push(this.createVertex(0.62, 0.02, 0.62, 0.26, -0.88, -0.31, b, 0.62, 0.87));
  38.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, 0.00, 0.97, -0.00, b, 0.58, 0.00));
  39.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, 0.00, -0.98, -0.00, b, 0.58, 1.00));
  40.     c.Vertices.push(this.createVertex(0.56, 0.95, 0.66, 0.17, 0.87, -0.37, b, 0.56, 0.11));
  41.     c.Vertices.push(this.createVertex(0.56, 0.02, 0.66, 0.12, -0.88, -0.38, b, 0.56, 0.87));
  42.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.00, 0.97, -0.01, b, 0.52, 0.00));
  43.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, 0.00, -0.98, -0.01, b, 0.52, 1.00));
  44.     c.Vertices.push(this.createVertex(0.50, 0.95, 0.68, 0.01, 0.87, -0.40, b, 0.50, 0.11));
  45.     c.Vertices.push(this.createVertex(0.50, 0.02, 0.68, -0.02, -0.88, -0.40, b, 0.50, 0.87));
  46.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.00, 0.97, -0.01, b, 0.45, 0.00));
  47.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, -0.00, -0.98, -0.01, b, 0.45, 1.00));
  48.     c.Vertices.push(this.createVertex(0.41, 0.95, 0.66, -0.14, 0.87, -0.38, b, 0.42, 0.11));
  49.     c.Vertices.push(this.createVertex(0.41, 0.02, 0.66, -0.17, -0.88, -0.37, b, 0.42, 0.87));
  50.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.00, 0.97, -0.00, b, 0.39, 0.00));
  51.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, -0.00, -0.98, -0.00, b, 0.39, 1.00));
  52.     c.Vertices.push(this.createVertex(0.35, 0.95, 0.62, -0.28, 0.87, -0.31, b, 0.37, 0.11));
  53.     c.Vertices.push(this.createVertex(0.35, 0.02, 0.62, -0.31, -0.88, -0.28, b, 0.37, 0.87));
  54.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.02, 0.97, -0.00, b, 0.34, 0.00));
  55.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, -0.00, -0.98, -0.00, b, 0.34, 1.00));
  56.     c.Vertices.push(this.createVertex(0.31, 0.95, 0.56, -0.37, 0.87, -0.17, b, 0.31, 0.11));
  57.     c.Vertices.push(this.createVertex(0.31, 0.02, 0.56, -0.38, -0.88, -0.14, b, 0.31, 0.87));
  58.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.01, 0.97, -0.00, b, 0.28, 0.00));
  59.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, -0.01, -0.98, -0.00, b, 0.28, 1.00));
  60.     c.Vertices.push(this.createVertex(0.29, 0.95, 0.50, -0.40, 0.87, -0.02, b, 0.25, 0.11));
  61.     c.Vertices.push(this.createVertex(0.29, 0.02, 0.50, -0.40, -0.88, 0.01, b, 0.25, 0.87));
  62.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.01, 0.97, 0.00, b, 0.20, 0.00));
  63.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, -0.01, -0.98, 0.00, b, 0.20, 1.00));
  64.     c.Vertices.push(this.createVertex(0.31, 0.95, 0.41, -0.38, 0.87, 0.12, b, 0.17, 0.11));
  65.     c.Vertices.push(this.createVertex(0.31, 0.02, 0.41, -0.37, -0.88, 0.17, b, 0.17, 0.87));
  66.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.02, 0.97, 0.00, b, 0.14, 0.00));
  67.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, -0.00, -0.98, 0.00, b, 0.14, 1.00));
  68.     c.Vertices.push(this.createVertex(0.35, 0.95, 0.35, -0.31, 0.87, 0.26, b, 0.11, 0.11));
  69.     c.Vertices.push(this.createVertex(0.35, 0.02, 0.35, -0.28, -0.88, 0.29, b, 0.11, 0.87));
  70.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.00, 0.97, 0.00, b, 0.08, 0.00));
  71.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, -0.00, -0.98, 0.00, b, 0.08, 1.00));
  72.     c.Vertices.push(this.createVertex(0.41, 0.95, 0.31, -0.17, 0.87, 0.35, b, 0.05, 0.11));
  73.     c.Vertices.push(this.createVertex(0.41, 0.02, 0.31, -0.14, -0.88, 0.37, b, 0.05, 0.87));
  74.     c.Vertices.push(this.createVertex(0.50, 1.00, 0.50, -0.00, 0.97, 0.00, b, 0.02, 0.00));
  75.     c.Vertices.push(this.createVertex(0.50, 0.00, 0.50, -0.00, -0.98, 0.00, b, 0.02, 1.00));
  76.     c.Vertices.push(this.createVertex(0.50, 0.95, 0.29, -0.04, 0.87, 0.40, b, 0.00, 0.11));
  77.     c.Vertices.push(this.createVertex(0.50, 0.02, 0.29, -0.00, -0.89, 0.38, b, 0.00, 0.87));
  78.     c.Vertices.push(this.createVertex(0.50, 0.84, 0.14, 0.02, 0.69, 0.66, b, 1.00, 0.25));
  79.     c.Vertices.push(this.createVertex(0.62, 0.84, 0.17, 0.25, 0.68, 0.62, b, 0.93, 0.25));
  80.     c.Vertices.push(this.createVertex(0.50, 0.68, 0.02, 0.04, 0.37, 0.87, b, 1.00, 0.37));
  81.     c.Vertices.push(this.createVertex(0.66, 0.68, 0.07, 0.32, 0.35, 0.81, b, 0.93, 0.37));
  82.     c.Vertices.push(this.createVertex(0.50, 0.50, 0.00, 0.05, 0.01, 0.95, b, 1.00, 0.50));
  83.     c.Vertices.push(this.createVertex(0.68, 0.50, 0.02, 0.35, -0.00, 0.87, b, 0.93, 0.50));
  84.     c.Vertices.push(this.createVertex(0.50, 0.29, 0.02, 0.05, -0.34, 0.88, b, 1.00, 0.62));
  85.     c.Vertices.push(this.createVertex(0.66, 0.29, 0.07, 0.34, -0.37, 0.81, b, 0.93, 0.62));
  86.     c.Vertices.push(this.createVertex(0.50, 0.14, 0.14, 0.04, -0.68, 0.69, b, 1.00, 0.75));
  87.     c.Vertices.push(this.createVertex(0.62, 0.14, 0.17, 0.26, -0.68, 0.62, b, 0.93, 0.75));
  88.     c.Vertices.push(this.createVertex(0.75, 0.84, 0.25, 0.46, 0.68, 0.48, b, 0.87, 0.25));
  89.     c.Vertices.push(this.createVertex(0.81, 0.68, 0.17, 0.62, 0.35, 0.62, b, 0.87, 0.37));
  90.     c.Vertices.push(this.createVertex(0.84, 0.50, 0.14, 0.68, 0.00, 0.68, b, 0.87, 0.50));
  91.     c.Vertices.push(this.createVertex(0.81, 0.29, 0.17, 0.62, -0.37, 0.62, b, 0.87, 0.62));
  92.     c.Vertices.push(this.createVertex(0.75, 0.14, 0.25, 0.48, -0.68, 0.46, b, 0.87, 0.75));
  93.     c.Vertices.push(this.createVertex(0.81, 0.84, 0.35, 0.62, 0.68, 0.26, b, 0.81, 0.25));
  94.     c.Vertices.push(this.createVertex(0.91, 0.68, 0.31, 0.81, 0.35, 0.34, b, 0.81, 0.37));
  95.     c.Vertices.push(this.createVertex(0.95, 0.50, 0.29, 0.87, 0.00, 0.35, b, 0.81, 0.50));
  96.     c.Vertices.push(this.createVertex(0.91, 0.29, 0.31, 0.81, -0.37, 0.32, b, 0.81, 0.62));
  97.     c.Vertices.push(this.createVertex(0.81, 0.14, 0.35, 0.62, -0.68, 0.25, b, 0.81, 0.75));
  98.     c.Vertices.push(this.createVertex(0.84, 0.84, 0.50, 0.68, 0.68, 0.00, b, 0.75, 0.25));
  99.     c.Vertices.push(this.createVertex(0.95, 0.68, 0.50, 0.88, 0.35, 0.00, b, 0.75, 0.37));
  100.     c.Vertices.push(this.createVertex(1.00, 0.50, 0.50, 0.95, 0.00, 0.00, b, 0.75, 0.50));
  101.     c.Vertices.push(this.createVertex(0.95, 0.29, 0.50, 0.88, -0.37, -0.00, b, 0.75, 0.62));
  102.     c.Vertices.push(this.createVertex(0.84, 0.14, 0.50, 0.68, -0.68, -0.00, b, 0.75, 0.75));
  103.     c.Vertices.push(this.createVertex(0.81, 0.84, 0.62, 0.62, 0.68, -0.25, b, 0.68, 0.25));
  104.     c.Vertices.push(this.createVertex(0.91, 0.68, 0.66, 0.81, 0.35, -0.34, b, 0.68, 0.37));
  105.     c.Vertices.push(this.createVertex(0.95, 0.50, 0.68, 0.87, -0.00, -0.37, b, 0.68, 0.50));
  106.     c.Vertices.push(this.createVertex(0.91, 0.29, 0.66, 0.81, -0.37, -0.34, b, 0.68, 0.62));
  107.     c.Vertices.push(this.createVertex(0.81, 0.14, 0.62, 0.62, -0.68, -0.28, b, 0.68, 0.75));
  108.     c.Vertices.push(this.createVertex(0.75, 0.84, 0.75, 0.48, 0.68, -0.47, b, 0.62, 0.25));
  109.     c.Vertices.push(this.createVertex(0.81, 0.68, 0.81, 0.62, 0.35, -0.62, b, 0.62, 0.37));
  110.     c.Vertices.push(this.createVertex(0.84, 0.50, 0.84, 0.68, 0.00, -0.68, b, 0.62, 0.50));
  111.     c.Vertices.push(this.createVertex(0.81, 0.29, 0.81, 0.62, -0.37, -0.63, b, 0.62, 0.62));
  112.     c.Vertices.push(this.createVertex(0.75, 0.14, 0.75, 0.46, -0.68, -0.50, b, 0.62, 0.75));
  113.     c.Vertices.push(this.createVertex(0.62, 0.84, 0.81, 0.26, 0.68, -0.63, b, 0.56, 0.25));
  114.     c.Vertices.push(this.createVertex(0.66, 0.68, 0.91, 0.34, 0.35, -0.82, b, 0.56, 0.37));
  115.     c.Vertices.push(this.createVertex(0.68, 0.50, 0.95, 0.35, 0.00, -0.88, b, 0.56, 0.50));
  116.     c.Vertices.push(this.createVertex(0.66, 0.29, 0.91, 0.32, -0.37, -0.82, b, 0.56, 0.62));
  117.     c.Vertices.push(this.createVertex(0.62, 0.14, 0.81, 0.25, -0.68, -0.63, b, 0.56, 0.75));
  118.     c.Vertices.push(this.createVertex(0.50, 0.84, 0.84, 0.00, 0.68, -0.68, b, 0.50, 0.25));
  119.     c.Vertices.push(this.createVertex(0.50, 0.68, 0.95, 0.00, 0.35, -0.89, b, 0.50, 0.37));
  120.     c.Vertices.push(this.createVertex(0.50, 0.50, 1.00, 0.00, 0.00, -0.96, b, 0.50, 0.50));
  121.     c.Vertices.push(this.createVertex(0.50, 0.29, 0.95, -0.00, -0.37, -0.89, b, 0.50, 0.62));
  122.     c.Vertices.push(this.createVertex(0.50, 0.14, 0.84, -0.00, -0.68, -0.68, b, 0.50, 0.75));
  123.     c.Vertices.push(this.createVertex(0.35, 0.84, 0.81, -0.25, 0.68, -0.63, b, 0.42, 0.25));
  124.     c.Vertices.push(this.createVertex(0.31, 0.68, 0.91, -0.34, 0.35, -0.82, b, 0.42, 0.37));
  125.     c.Vertices.push(this.createVertex(0.29, 0.50, 0.95, -0.37, -0.00, -0.88, b, 0.42, 0.50));
  126.     c.Vertices.push(this.createVertex(0.31, 0.29, 0.91, -0.34, -0.37, -0.82, b, 0.42, 0.62));
  127.     c.Vertices.push(this.createVertex(0.35, 0.14, 0.81, -0.28, -0.68, -0.63, b, 0.42, 0.75));
  128.     c.Vertices.push(this.createVertex(0.25, 0.84, 0.75, -0.47, 0.68, -0.50, b, 0.37, 0.25));
  129.     c.Vertices.push(this.createVertex(0.17, 0.68, 0.81, -0.62, 0.35, -0.63, b, 0.37, 0.37));
  130.     c.Vertices.push(this.createVertex(0.14, 0.50, 0.84, -0.68, 0.00, -0.68, b, 0.37, 0.50));
  131.     c.Vertices.push(this.createVertex(0.17, 0.29, 0.81, -0.63, -0.37, -0.62, b, 0.37, 0.62));
  132.     c.Vertices.push(this.createVertex(0.25, 0.14, 0.75, -0.50, -0.68, -0.47, b, 0.37, 0.75));
  133.     c.Vertices.push(this.createVertex(0.17, 0.84, 0.62, -0.63, 0.68, -0.28, b, 0.31, 0.25));
  134.     c.Vertices.push(this.createVertex(0.07, 0.68, 0.66, -0.82, 0.35, -0.34, b, 0.31, 0.37));
  135.     c.Vertices.push(this.createVertex(0.02, 0.50, 0.68, -0.88, 0.00, -0.37, b, 0.31, 0.50));
  136.     c.Vertices.push(this.createVertex(0.07, 0.29, 0.66, -0.82, -0.37, -0.34, b, 0.31, 0.62));
  137.     c.Vertices.push(this.createVertex(0.17, 0.14, 0.62, -0.63, -0.68, -0.25, b, 0.31, 0.75));
  138.     c.Vertices.push(this.createVertex(0.14, 0.84, 0.50, -0.68, 0.68, -0.00, b, 0.25, 0.25));
  139.     c.Vertices.push(this.createVertex(0.02, 0.68, 0.50, -0.89, 0.35, -0.00, b, 0.25, 0.37));
  140.     c.Vertices.push(this.createVertex(0.00, 0.50, 0.50, -0.96, 0.00, -0.00, b, 0.25, 0.50));
  141.     c.Vertices.push(this.createVertex(0.02, 0.29, 0.50, -0.89, -0.37, 0.00, b, 0.25, 0.62));
  142.     c.Vertices.push(this.createVertex(0.14, 0.14, 0.50, -0.68, -0.68, 0.00, b, 0.25, 0.75));
  143.     c.Vertices.push(this.createVertex(0.17, 0.84, 0.35, -0.63, 0.68, 0.25, b, 0.17, 0.25));
  144.     c.Vertices.push(this.createVertex(0.07, 0.68, 0.31, -0.82, 0.35, 0.32, b, 0.17, 0.37));
  145.     c.Vertices.push(this.createVertex(0.02, 0.50, 0.29, -0.88, -0.00, 0.35, b, 0.17, 0.50));
  146.     c.Vertices.push(this.createVertex(0.07, 0.29, 0.31, -0.82, -0.37, 0.34, b, 0.17, 0.62));
  147.     c.Vertices.push(this.createVertex(0.17, 0.14, 0.35, -0.63, -0.68, 0.26, b, 0.17, 0.75));
  148.     c.Vertices.push(this.createVertex(0.25, 0.84, 0.25, -0.50, 0.68, 0.46, b, 0.11, 0.25));
  149.     c.Vertices.push(this.createVertex(0.17, 0.68, 0.17, -0.63, 0.35, 0.62, b, 0.11, 0.37));
  150.     c.Vertices.push(this.createVertex(0.14, 0.50, 0.14, -0.68, 0.00, 0.68, b, 0.11, 0.50));
  151.     c.Vertices.push(this.createVertex(0.17, 0.29, 0.17, -0.62, -0.37, 0.62, b, 0.11, 0.62));
  152.     c.Vertices.push(this.createVertex(0.25, 0.14, 0.25, -0.47, -0.68, 0.48, b, 0.11, 0.75));
  153.     c.Vertices.push(this.createVertex(0.35, 0.84, 0.17, -0.28, 0.68, 0.62, b, 0.05, 0.25));
  154.     c.Vertices.push(this.createVertex(0.31, 0.68, 0.07, -0.34, 0.35, 0.81, b, 0.05, 0.37));
  155.     c.Vertices.push(this.createVertex(0.29, 0.50, 0.02, -0.37, 0.00, 0.87, b, 0.05, 0.50));
  156.     c.Vertices.push(this.createVertex(0.31, 0.29, 0.07, -0.34, -0.37, 0.81, b, 0.05, 0.62));
  157.     c.Vertices.push(this.createVertex(0.35, 0.14, 0.17, -0.25, -0.68, 0.62, b, 0.05, 0.75));
  158.     c.Vertices.push(this.createVertex(0.50, 0.84, 0.14, -0.05, 0.66, 0.69, b, 0.00, 0.25));
  159.     c.Vertices.push(this.createVertex(0.50, 0.68, 0.02, -0.07, 0.34, 0.88, b, 0.00, 0.37));
  160.     c.Vertices.push(this.createVertex(0.50, 0.50, 0.00, -0.07, -0.02, 0.95, b, 0.00, 0.50));
  161.     c.Vertices.push(this.createVertex(0.50, 0.29, 0.02, -0.05, -0.38, 0.87, b, 0.00, 0.62));
  162.     c.Vertices.push(this.createVertex(0.50, 0.14, 0.14, -0.03, -0.70, 0.66, b, 0.00, 0.75));
  163.  
  164.     for (var d = 0; d < c.Vertices.length; ++d) {
  165.         var a = c.Vertices[d].Pos;
  166.         a.multiplyThisWithScal(e);
  167.         a.X -= e * 0.5;
  168.         a.Y -= e * 0.5;
  169.         a.Z -= e * 0.5
  170.     }
  171.     c.recalculateBoundingBox();
  172.     this.OwnedMesh.Box = c.Box.clone();
  173.     this.init()
  174. };
  175. CL3D.SphereSceneNode.prototype = new CL3D.MeshSceneNode();
  176. CL3D.SphereSceneNode.prototype.createVertex = function (g, f, e, d, c, b, j, i, h) {
  177.     var a = new CL3D.Vertex3D(true);
  178.     a.Pos.X = g;
  179.     a.Pos.Y = f;
  180.     a.Pos.Z = e;
  181.     a.Normal.X = d;
  182.     a.Normal.Y = c;
  183.     a.Normal.Z = b;
  184.     a.TCoords.X = h;
  185.     a.TCoords.Y = i;
  186.     return a
  187. };
  188. CL3D.SphereSceneNode.prototype.createClone = function (a) {
  189.     var b = new CL3D.SphereSceneNode();
  190.     this.cloneMembers(b, a);
  191.     b.OwnedMesh = this.OwnedMesh;
  192.     b.ReadonlyMaterials = this.ReadonlyMaterials;
  193.     b.DoesCollision = this.DoesCollision;
  194.     if (this.Box) {
  195.         b.Box = this.Box.clone()
  196.     }
  197.     return b
  198. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement