Changeset 3756 in orxonox.OLD for orxonox/branches/convention/src/world_entities/test_mat.cc
- Timestamp:
- Apr 8, 2005, 12:54:23 AM (20 years ago)
- Location:
- orxonox/branches/convention
- Files:
-
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/convention/src/world_entities/test_mat.cc
r3752 r3756 18 18 #define DEBUG_SPECIAL_MODULE DEBUG_MODULE_WORLD_ENTITY 19 19 20 #include "proto_class.h" 21 22 #include "stdincl.h" // maybe 23 20 #include "test_mat.h" 21 #include "resource_manager.h" 22 #include "material.h" 23 #include "model.h" 24 #include "primitive_model.h" 25 #include "light.h" 24 26 using namespace std; 25 27 … … 29 31 \todo this constructor is not jet implemented - do it 30 32 */ 31 ProtoClass::ProtoClass()33 TestMat::TestMat () 32 34 { 33 this->setClassName ("ProtoClass"); 35 this->setClassName ("TestMat"); 36 37 /* this->model1 = (Model*)ResourceManager::getInstance()->load("cube", PRIM, RP_LEVEL); 38 this->model2 = (Model*)ResourceManager::getInstance()->load("sphere", PRIM, RP_LEVEL); 39 this->model3 = (Model*)ResourceManager::getInstance()->load("cylinder", PRIM, RP_LEVEL); 40 this->model4 = (Model*)ResourceManager::getInstance()->load("cone", PRIM, RP_LEVEL); 41 */ 42 this->model1 = new PrimitiveModel(SPHERE); 43 this->model2 = new PrimitiveModel(CUBE); 44 this->model3 = new PrimitiveModel(CONE); 45 this->model4 = new PrimitiveModel(CYLINDER); 46 this->mat1 = new Material(); 47 this->mat2 = new Material(); 48 this->mat3 = new Material(); 49 this->mat4 = new Material(); 50 51 this->enabled = false; 34 52 } 35 53 54 void TestMat::enable() 55 { 56 this->enabled = true; 57 } 36 58 37 59 /** … … 39 61 40 62 */ 41 ProtoClass::~ProtoClass()63 TestMat::~TestMat () 42 64 { 43 65 // delete what has to be deleted here 44 66 } 45 67 46 /**47 \brief nonsense - delete this method48 \param realy nothing to give49 \returns true or false - probably nothing?50 68 51 this is just to show the doxygen abilities (this for example is an extension for a long comment) 52 */ 53 bool ProtoClass::doNonSense (int nothing) {} 69 void TestMat::draw() 70 { 71 if (this->enabled) 72 { 73 glPushMatrix(); 74 this->mat1->select(); 75 this->model1->draw(); 76 77 glTranslatef(0,0,2); 78 this->mat2->select(); 79 this->model2->draw(); 80 81 glTranslatef(0,2,-2); 82 this->mat3->select(); 83 this->model3->draw(); 84 85 glTranslatef(0,0,2); 86 this->mat4->select(); 87 this->model4->draw(); 88 glPopMatrix(); 89 } 90 }
Note: See TracChangeset
for help on using the changeset viewer.