- Timestamp:
- Jul 12, 2005, 10:55:44 PM (19 years ago)
- Location:
- orxonox/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/defs/include_paths.am
r4758 r4842 9 9 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics 10 10 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer 11 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/spatial_separation 11 12 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/particles 12 13 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui -
orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.cc
r4841 r4842 105 105 * @param playerModel the model that this measurement is based on 106 106 \return the dimension of the AbstractModel as a Rectangle 107 108 The rectangle is x-z axis aligned. ATTENTION: if there are any vertices in the model, that exceed the 109 size of 999999.0, there probably will be some errors in the dimensions calculations. 107 110 */ 108 111 Rectangle* SpatialSeparation::getDimension(AbstractModel* playerModel) 109 112 { 113 float maxX, maxY; //!< the maximal coordinates axis 114 float minX, minY; //!< minimal axis coorindates 115 const float* pVertices; //!< pointer to the current vertices 110 116 117 maxX = -999999; maxY = -999999; 118 minX = 999999; minY = 999999; 119 /* get maximal/minimal x/y */ 120 for( int i = 0; i < playerModel->getModelInfo()->numVertices; ++i) 121 { 122 pVertices = &playerModel->getModelInfo()->pVertices[i * 3]; 123 if( pVertices[0] > maxX) 124 maxX = pVertices[0]; 125 if( pVertices[2] > maxY) 126 maxY = pVertices[2]; 127 128 if( pVertices[0] < minX) 129 minX = pVertices[0]; 130 if( pVertices[2] < minY) 131 minY = pVertices[2]; 132 133 PRINTF(0)("Dimension Informationation: X: min/max %f/%f Y: min/max %f/%f\n", minX, maxX, minY, maxY); 134 } 111 135 } 112 136 113 137 114 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 -
orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.h
r4841 r4842 1 1 /*! 2 \file spatial_separation.h 3 * Definition of the generic spatial separation process of model data 4 2 \file spatial_separation.h Definition of the generic spatial separation process of model data 5 3 */ 6 4 … … 40 38 Vector center; 41 39 float axis[2]; 40 }; 42 41 43 };44 42 45 43 //! A class for spatial separation of vertices based arrays -
orxonox/trunk/src/world_entities/terrain.cc
r4836 r4842 24 24 #include "load_param.h" 25 25 26 #include "spatial_separation.h" 27 26 28 using namespace std; 27 29 … … 83 85 { 84 86 this->setClassID(CL_TERRAIN, "Terrain"); 87 88 SpatialSeparation* ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f); 89 90 85 91 86 92 this->objectList = 0;
Note: See TracChangeset
for help on using the changeset viewer.