Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2005, 11:25:53 PM (19 years ago)
Author:
patrick
Message:

orxonox/trunk: debuged the getDimension funciton, some mods on rectangle class

Location:
orxonox/trunk/src/lib/graphics/spatial_separation
Files:
2 edited

Legend:

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

    r4842 r4844  
    3434{
    3535   this->setClassID(CL_SPATIAL_SEPARATION, "SpatialSeparation");
    36 
     36   this->getDimension(model);
    3737}
    3838
     
    130130    if( pVertices[2] < minY)
    131131      minY = pVertices[2];
     132  }
     133  Rectangle* rect = new Rectangle();
    132134
    133     PRINTF(0)("Dimension Informationation: X: min/max %f/%f Y: min/max %f/%f\n", minX, maxX, minY, maxY);
    134   }
     135  rect->setCenter((maxX + minX) / 2.0f, 0.0f, (maxY + minY) / 2.0f);
     136
     137
     138  PRINTF(0)("Dimension Informationation: X: min/max %f/%f Y: min/max %f/%f\n", minX, maxX, minY, maxY);
    135139}
    136140
  • orxonox/trunk/src/lib/graphics/spatial_separation/spatial_separation.h

    r4842 r4844  
    2222
    2323  public:
    24     Rectangle();
    25     virtual ~Rectangle();
     24    Rectangle() {}
     25    virtual ~Rectangle() {}
    2626
    2727    /** \brief sets the center of the rectangle to a defined vector @param center the new center */
    2828    inline void setCenter(const Vector &center) { this->center = center;}
     29    /** \brief sets the center of the rectangle to a defined vector @param x coord of the center @param y coord of the center @param z coord of the center */
     30    inline void setCenter(float x, float y, float z) { this->center.x = x; this->center.y = y; this->center.z = z; }
    2931    /** \brief returns the center of the rectangle to a defined vector @returns center the new center */
    3032    inline const Vector* getCenter() const { return &this->center; }
Note: See TracChangeset for help on using the changeset viewer.