Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4855 in orxonox.OLD


Ignore:
Timestamp:
Jul 13, 2005, 11:27:44 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: reimplemented the array creation process, now there are no more segfaults

Location:
orxonox/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/lib/graphics/spatial_separation/quadtree_node.cc

    r4854 r4855  
    5555void QuadtreeNode::init()
    5656{
    57   PRINTF(0)("Creating QuadtreeNode\n");
    5857  this->setClassID(CL_QUADTREE_NODE, "QuadtreeNode");
    5958
     
    125124  printf("Temp. list Num. o El: A: %i, B: %i, C: %i, D: %i\n", listA->getSize(), listB->getSize(), listC->getSize(), listD->getSize());
    126125
    127 
    128126 
    129127  /* Separating into to the triangle lists  */
     
    137135  float                          lenD;                                  //!< length array D
    138136  tIterator<sTriangleExt*>*      iterator;                              //!< iterator for the list iterations
    139   sTriangleExt*                  tempTri;                               //!< temp save place for triangle pointer
     137  sTriangleExt**                 tempTri;                               //!< temp save place for triangle pointer
    140138  int                            counter;                               //!< counter for the while loops
    141139
     
    153151  counter = 0;
    154152  iterator = listA->getIterator();
    155   tempTri = *iterator->nextElement();
    156   while( tempTri)
    157     {
    158       pTriA[counter] = tempTri;
    159       tempTri = *iterator->nextElement();
     153  tempTri = iterator->nextElement();
     154  while( tempTri)
     155    {
     156      pTriA[counter] = *tempTri;
     157      tempTri = iterator->nextElement();
    160158      ++counter;
    161159    }
     
    163161  counter = 0;
    164162  iterator = listB->getIterator();
    165   tempTri = *iterator->nextElement();
    166   while( tempTri)
    167     {
    168       pTriB[counter] = tempTri;
    169       tempTri = *iterator->nextElement();
     163  tempTri = iterator->nextElement();
     164  while( tempTri)
     165    {
     166      pTriB[counter] = *tempTri;
     167      tempTri = iterator->nextElement();
    170168      ++counter;
    171169    }
     
    173171  counter = 0;
    174172  iterator = listC->getIterator();
    175   tempTri = *iterator->nextElement();
    176   while( tempTri)
    177     {
    178       pTriC[counter] = tempTri;
    179       tempTri = *iterator->nextElement();
     173  tempTri = iterator->nextElement();
     174  while( tempTri)
     175    {
     176      pTriC[counter] = *tempTri;
     177      tempTri = iterator->nextElement();
    180178      ++counter;
    181179    }
     
    183181  counter = 0;
    184182  iterator = listD->getIterator();
    185   tempTri = *iterator->nextElement();
    186   while( tempTri)
    187     {
    188       pTriD[counter] = tempTri;
    189       tempTri = *iterator->nextElement();
     183  tempTri = iterator->nextElement();
     184  while( tempTri)
     185    {
     186      pTriD[counter] = *tempTri;
     187      tempTri = iterator->nextElement();
    190188      ++counter;
    191189    }
     
    241239
    242240  PRINTF(0)("Dimension Informationation: X: min/max %f/%f Y: min/max %f/%f\n", minX, maxX, minY, maxY);
    243   PRINTF(0)("Center: %f,%f   Axis: %f\n", rect->getCenter()->x, rect->getCenter()->y, rect->getCenter()->z, rect->getAxis());
     241  PRINTF(0)("Center: %f, %f, %f   Axis: %f\n", rect->getCenter()->x, rect->getCenter()->y, rect->getCenter()->z, rect->getAxis());
    244242  return rect;
    245243}
  • orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.cc

    r4854 r4855  
    9797{
    9898  this->quadtree = new Quadtree(model->getModelInfo());
    99   //this->quadtree->separate();
     99  this->quadtree->separate();
    100100
    101101  return this->quadtree;
  • orxonox/trunk/src/world_entities/terrain.cc

    r4854 r4855  
    3939  this->loadParams(root);
    4040
    41   //SpatialSeparation* ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f);
    42   //delete ssp;
    43 }
     41  SpatialSeparation* ssp = new SpatialSeparation((AbstractModel*)this->model, 10.0f);
     42  delete ssp;
     43}
     44
    4445
    4546/**
Note: See TracChangeset for help on using the changeset viewer.