Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4677 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Jun 23, 2005, 11:29:18 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: possibility to return the count of faces of some Object

Location:
orxonox/trunk/src/lib
Files:
5 edited

Legend:

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

    r4580 r4677  
    145145  this->normalCount = 0;
    146146  this->texCoordCount = 0;
     147  this->faceCount = 0;
    147148
    148149  this->scaleFactor = 1;
     
    553554
    554555  this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount -2;
     556  this->faceCount += this->currentGroup->currentFace->vertexCount -2;
    555557}
    556558
     
    585587
    586588  this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount - 2;
     589  this->faceCount += this->currentGroup->currentFace->vertexCount -2;
    587590}
    588591
  • orxonox/trunk/src/lib/graphics/importer/model.h

    r4579 r4677  
    141141
    142142  /** \returns The number of Vertices of the Model */
    143   inline int getVertexCount(void) const {return this->vertexCount;}
     143  inline int getVertexCount(void) const { return this->vertexCount; };
    144144  /** \returns The number of Normals of the Model */
    145   inline int getNormalCount(void) const {return this->normalCount;}
    146   /** \returns The number of Texture Coordinates of the Model*/
    147   inline int getTexCoordCount(void) const {return this->texCoordCount;}
     145  inline int getNormalCount(void) const { return this->normalCount; };
     146  /** \returns The number of Texture Coordinates of the Model */
     147  inline int getTexCoordCount(void) const { return this->texCoordCount; };
     148  /** \returns The number of Faces of the entire Model */
     149  inline unsigned int getFaceCount() const { return this->faceCount; };
    148150
    149151 protected:
     
    174176  unsigned int     normalCount;     //!< A modelwide Counter for the normals.
    175177  unsigned int     texCoordCount;   //!< A modelwide Counter for the texCoord.
     178  unsigned int     faceCount;       //!< A modelwide Counter for the faces
    176179  Array<GLfloat>*  vertices;        //!< The Array that handles the Vertices.
    177180  Array<GLfloat>*  normals;         //!< The Array that handles the Normals.
  • orxonox/trunk/src/lib/particles/particle_engine.h

    r4519 r4677  
    1 /*! 
     1/*!
    22    \file particle_engine.h
    33    \brief Definition of the ParticleEngine
     
    1111#include "particle_emitter.h"
    1212
    13 // FORWARD DEFINITION 
     13// FORWARD DEFINITION
    1414template<class T> class tList;
    1515
  • orxonox/trunk/src/lib/particles/particle_system.cc

    r4667 r4677  
    4545}
    4646
     47/**
     48  \brief creates a Particle System out of a XML-element
     49  \param root: the XML-element to load from
     50 */
    4751ParticleSystem::ParticleSystem(const TiXmlElement* root) : PhysicsInterface(this)
    4852{
     
    329333      tickPart = tickPart->next;
    330334    }
     335}
     336
     337
     338/**
     339 * \returns the count of Faces of this ParticleSystem
     340 */
     341unsigned int ParticleSystem::getFaceCount(void) const
     342{
     343  switch (this->particleType)
     344  {
     345    case PARTICLE_SPRITE:
     346      return this->count;
     347      break;
     348    case PARTICLE_MODEL:
     349      if (this->model)
     350        return this->count * this->model->getFaceCount();
     351      break;
     352  }
    331353}
    332354
  • orxonox/trunk/src/lib/particles/particle_system.h

    r4663 r4677  
    101101  inline float getMass(void) const { return this->initialMass; };
    102102
     103  unsigned int getFaceCount(void) const;
     104
     105
    103106  virtual void applyField(Field* field);
    104107  /** \brief this is an empty function, because the Physics are implemented in tick \param dt: useless here */
Note: See TracChangeset for help on using the changeset viewer.