diff options
author | Teravus Ovares | 2008-02-08 22:11:28 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-08 22:11:28 +0000 |
commit | b63c267f0b4bda10651adf0e54c3dce2c107b5f8 (patch) | |
tree | c03d1b87d8f20c618c146a306558984e9e1e9c84 /OpenSim/Region/Physics | |
parent | refactor - remove unused m_children from EntityBase (diff) | |
download | opensim-SC-b63c267f0b4bda10651adf0e54c3dce2c107b5f8.zip opensim-SC-b63c267f0b4bda10651adf0e54c3dce2c107b5f8.tar.gz opensim-SC-b63c267f0b4bda10651adf0e54c3dce2c107b5f8.tar.bz2 opensim-SC-b63c267f0b4bda10651adf0e54c3dce2c107b5f8.tar.xz |
* Finished Cylinder in the Meshmerizer. Hollow and Path cut work for it now. Enjoy the new physics-friendly prim type.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 38d431f..2d80287 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -192,8 +192,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
192 | // Base | 192 | // Base |
193 | Vertex MM = new Vertex(-0.5f, -0.5f, 0.0f); | 193 | Vertex MM = new Vertex(-0.5f, -0.5f, 0.0f); |
194 | Vertex PM = new Vertex(+0.5f, -0.5f, 0.0f); | 194 | Vertex PM = new Vertex(+0.5f, -0.5f, 0.0f); |
195 | Vertex MP = new Vertex(-0.5f, +0.5f, 0.0f); | ||
196 | Vertex PP = new Vertex(+0.5f, +0.5f, 0.0f); | 195 | Vertex PP = new Vertex(+0.5f, +0.5f, 0.0f); |
196 | Vertex MP = new Vertex(-0.5f, +0.5f, 0.0f); | ||
197 | 197 | ||
198 | SimpleHull outerHull = new SimpleHull(); | 198 | SimpleHull outerHull = new SimpleHull(); |
199 | outerHull.AddVertex(MM); | 199 | outerHull.AddVertex(MM); |
@@ -248,8 +248,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
248 | float hollowFactorF = (float) hollowFactor/(float) 50000; | 248 | float hollowFactorF = (float) hollowFactor/(float) 50000; |
249 | Vertex IMM = new Vertex(-0.5f*hollowFactorF, -0.5f*hollowFactorF, 0.0f); | 249 | Vertex IMM = new Vertex(-0.5f*hollowFactorF, -0.5f*hollowFactorF, 0.0f); |
250 | Vertex IPM = new Vertex(+0.5f*hollowFactorF, -0.5f*hollowFactorF, 0.0f); | 250 | Vertex IPM = new Vertex(+0.5f*hollowFactorF, -0.5f*hollowFactorF, 0.0f); |
251 | Vertex IMP = new Vertex(-0.5f*hollowFactorF, +0.5f*hollowFactorF, 0.0f); | ||
252 | Vertex IPP = new Vertex(+0.5f*hollowFactorF, +0.5f*hollowFactorF, 0.0f); | 251 | Vertex IPP = new Vertex(+0.5f*hollowFactorF, +0.5f*hollowFactorF, 0.0f); |
252 | Vertex IMP = new Vertex(-0.5f*hollowFactorF, +0.5f*hollowFactorF, 0.0f); | ||
253 | |||
253 | 254 | ||
254 | SimpleHull holeHull = new SimpleHull(); | 255 | SimpleHull holeHull = new SimpleHull(); |
255 | 256 | ||
@@ -365,6 +366,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
365 | 366 | ||
366 | 367 | ||
367 | SimpleHull outerHull = new SimpleHull(); | 368 | SimpleHull outerHull = new SimpleHull(); |
369 | //Clockwise around the quadrants | ||
368 | outerHull.AddVertex(Q1Q15); | 370 | outerHull.AddVertex(Q1Q15); |
369 | outerHull.AddVertex(Q1Q16); | 371 | outerHull.AddVertex(Q1Q16); |
370 | outerHull.AddVertex(Q1Q17); | 372 | outerHull.AddVertex(Q1Q17); |
@@ -501,52 +503,52 @@ namespace OpenSim.Region.Physics.Meshing | |||
501 | Vertex IQ1Q13 = new Vertex(-0.43f * hollowFactorF, -0.24f * hollowFactorF, 0.0f); | 503 | Vertex IQ1Q13 = new Vertex(-0.43f * hollowFactorF, -0.24f * hollowFactorF, 0.0f); |
502 | Vertex IQ1Q14 = new Vertex(-0.40f * hollowFactorF, -0.30f * hollowFactorF, 0.0f); | 504 | Vertex IQ1Q14 = new Vertex(-0.40f * hollowFactorF, -0.30f * hollowFactorF, 0.0f); |
503 | 505 | ||
506 | //Counter clockwise around the quadrants | ||
504 | SimpleHull holeHull = new SimpleHull(); | 507 | SimpleHull holeHull = new SimpleHull(); |
505 | holeHull.AddVertex(Q1Q15); | 508 | holeHull.AddVertex(IQ1Q15); |
506 | holeHull.AddVertex(Q1Q16); | 509 | holeHull.AddVertex(IQ1Q14); |
507 | holeHull.AddVertex(Q1Q17); | 510 | holeHull.AddVertex(IQ1Q13); |
508 | holeHull.AddVertex(Q1Q18); | 511 | holeHull.AddVertex(IQ1Q12); |
509 | holeHull.AddVertex(Q1Q19); | 512 | holeHull.AddVertex(IQ1Q11); |
513 | holeHull.AddVertex(IQ1Q10); | ||
510 | 514 | ||
511 | holeHull.AddVertex(IQ2Q10); | 515 | holeHull.AddVertex(IQ1Q29); |
512 | holeHull.AddVertex(IQ2Q11); | 516 | holeHull.AddVertex(IQ1Q28); |
513 | holeHull.AddVertex(IQ2Q12); | 517 | holeHull.AddVertex(IQ1Q27); |
514 | holeHull.AddVertex(IQ2Q13); | 518 | holeHull.AddVertex(IQ1Q26); |
515 | holeHull.AddVertex(IQ2Q14); | 519 | holeHull.AddVertex(IQ1Q25); |
516 | holeHull.AddVertex(IQ2Q15); | 520 | holeHull.AddVertex(IQ1Q24); |
517 | holeHull.AddVertex(IQ2Q16); | 521 | holeHull.AddVertex(IQ1Q23); |
518 | holeHull.AddVertex(IQ2Q17); | 522 | holeHull.AddVertex(IQ1Q22); |
519 | holeHull.AddVertex(IQ2Q18); | 523 | holeHull.AddVertex(IQ1Q21); |
520 | holeHull.AddVertex(IQ2Q19); | 524 | holeHull.AddVertex(IQ1Q20); |
521 | 525 | ||
522 | holeHull.AddVertex(IQ2Q20); | ||
523 | holeHull.AddVertex(IQ2Q21); | ||
524 | holeHull.AddVertex(IQ2Q22); | ||
525 | holeHull.AddVertex(IQ2Q23); | ||
526 | holeHull.AddVertex(IQ2Q24); | ||
527 | holeHull.AddVertex(IQ2Q25); | ||
528 | holeHull.AddVertex(IQ2Q26); | ||
529 | holeHull.AddVertex(IQ2Q27); | ||
530 | holeHull.AddVertex(IQ2Q28); | ||
531 | holeHull.AddVertex(IQ2Q29); | 526 | holeHull.AddVertex(IQ2Q29); |
527 | holeHull.AddVertex(IQ2Q28); | ||
528 | holeHull.AddVertex(IQ2Q27); | ||
529 | holeHull.AddVertex(IQ2Q26); | ||
530 | holeHull.AddVertex(IQ2Q25); | ||
531 | holeHull.AddVertex(IQ2Q24); | ||
532 | holeHull.AddVertex(IQ2Q23); | ||
533 | holeHull.AddVertex(IQ2Q22); | ||
534 | holeHull.AddVertex(IQ2Q21); | ||
535 | holeHull.AddVertex(IQ2Q20); | ||
532 | 536 | ||
533 | holeHull.AddVertex(IQ1Q20); | 537 | holeHull.AddVertex(IQ2Q19); |
534 | holeHull.AddVertex(IQ1Q21); | 538 | holeHull.AddVertex(IQ2Q18); |
535 | holeHull.AddVertex(IQ1Q22); | 539 | holeHull.AddVertex(IQ2Q17); |
536 | holeHull.AddVertex(IQ1Q23); | 540 | holeHull.AddVertex(IQ2Q16); |
537 | holeHull.AddVertex(IQ1Q24); | 541 | holeHull.AddVertex(IQ2Q15); |
538 | holeHull.AddVertex(IQ1Q25); | 542 | holeHull.AddVertex(IQ2Q14); |
539 | holeHull.AddVertex(IQ1Q26); | 543 | holeHull.AddVertex(IQ2Q13); |
540 | holeHull.AddVertex(IQ1Q27); | 544 | holeHull.AddVertex(IQ2Q12); |
541 | holeHull.AddVertex(IQ1Q28); | 545 | holeHull.AddVertex(IQ2Q11); |
542 | holeHull.AddVertex(IQ1Q29); | 546 | holeHull.AddVertex(IQ2Q10); |
543 | 547 | ||
544 | holeHull.AddVertex(IQ1Q10); | 548 | holeHull.AddVertex(IQ1Q19); |
545 | holeHull.AddVertex(IQ1Q11); | 549 | holeHull.AddVertex(IQ1Q18); |
546 | holeHull.AddVertex(IQ1Q12); | 550 | holeHull.AddVertex(IQ1Q17); |
547 | holeHull.AddVertex(IQ1Q13); | 551 | holeHull.AddVertex(IQ1Q16); |
548 | holeHull.AddVertex(IQ1Q14); | ||
549 | |||
550 | 552 | ||
551 | SimpleHull hollowedHull = SimpleHull.SubtractHull(outerHull, holeHull); | 553 | SimpleHull hollowedHull = SimpleHull.SubtractHull(outerHull, holeHull); |
552 | 554 | ||