- Timestamp:
- Mar 24, 2005, 11:25:09 PM (20 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/lang/base_object.cc
r3646 r3651 60 60 } 61 61 62 62 /* 63 63 bool BaseObject::isFinalized() 64 64 { 65 return this->finalized;65 66 66 } 67 67 */ 68 68 69 69 void BaseObject::finalize() -
orxonox/trunk/src/lib/lang/base_object.h
r3646 r3651 21 21 bool isA (char* className); 22 22 23 bool isFinalized();23 inline bool isFinalized() { return this->finalized; } 24 24 void finalize(); 25 25 -
orxonox/trunk/src/orxonox.cc
r3650 r3651 334 334 #include "vector.h" 335 335 #include "player.h" 336 #include "base_object.h" 336 337 #include "primitive.h" 337 338 #include <asm/msr.h> … … 469 470 470 471 472 mittel = 0; 473 BaseObject* bo = new BaseObject(); 474 for(i = 0; i < ITERATIONS; ++i) 475 { 476 rdtscl(ini); 477 478 bo->isFinalized(); 479 480 rdtscl(end); 481 mittel += (end - ini - dt); 482 } 483 //delete w; 484 mi = mittel / (float)ITERATIONS; 485 printf(" Inl funct BaseObject::isFinazlized(): \t%11.2f\n", mi); 486 487 471 488 tList<WorldEntity>* list = new tList<WorldEntity>(); 472 489 … … 545 562 float mi; 546 563 int i = 0; 564 // quaternion generieren mit spez konstruktor 565 mittel = 0; 566 Vector* qa = new Vector(4.6, 9.3, 0.4); 567 Vector* qb = new Vector(3.5, 6.1, 4.3); 568 for(i = 0; i < VECTOR_MAX; ++i) 569 { 570 rdtscl(ini); 571 572 Quaternion* qu = new Quaternion(*qa, *qb); 573 574 rdtscl(end); 575 delete qu; 576 mittel += (end - ini - dt); 577 } 578 delete a; 579 delete b; 580 mi = mittel / (float)VECTOR_MAX; 581 printf(" Gen. quatern. betw. two vectors:\t%11.2f\n", mi); 582 583 547 584 // multiplication 548 585 mittel = 0; … … 557 594 } 558 595 mi = mittel / (float)VECTOR_MAX; 559 printf(" Multiplying two quat. (=rot):\t\t%11.2f\n", mi); 560 561 562 // multiplication 596 printf(" Multiplying two quat.(=rot): a * b\t%11.2f\n", mi); 597 598 599 600 // rotating a vector by a quaternion 563 601 mittel = 0; 564 602 for(i = 0; i < VECTOR_MAX; ++i) … … 566 604 rdtscl(ini); 567 605 568 * c = *a * *b;606 *qa = a->apply(*qb); 569 607 570 608 rdtscl(end); … … 572 610 } 573 611 mi = mittel / (float)VECTOR_MAX; 574 printf(" Multiplying two quat.(=rot):\t\t%11.2f\n", mi); 575 576 612 printf(" Rot a vec by a quat: q->apply(v)\t%11.2f\n", mi); 613 614 615 616 // generate rotation matrix 617 mittel = 0; 618 float matrix[4][4]; 619 for(i = 0; i < VECTOR_MAX; ++i) 620 { 621 rdtscl(ini); 622 623 a->matrix(matrix); 624 625 rdtscl(end); 626 mittel += (end - ini - dt); 627 } 628 mi = mittel / (float)VECTOR_MAX; 629 printf(" Generate rot matrix: q->matrix(m)\t%11.2f\n", mi); 630 631 632 633 634 577 635 } 578 636
Note: See TracChangeset
for help on using the changeset viewer.