Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3186 in orxonox.OLD for orxonox/trunk/importer/object.cc


Ignore:
Timestamp:
Dec 15, 2004, 7:51:10 PM (21 years ago)
Author:
bensch
Message:

orxonox/trunk: mainly importer: doxygen Tags updated for real.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/importer/object.cc

    r3140 r3186  
    1818
    1919/**
    20    \brief Creates a 3D-Object, but does not load any 3D-models
    21    pretty useless
     20   \brief Creates a 3D-Object, but does not load any 3D-models.
     21
     22   This Constructor is pretty useless, because why load no object in an object-loader??
    2223*/
    2324Object::Object ()
     
    3435
    3536/**
    36    \brief Crates a 3D-Object and loads in a File
     37   \brief Crates a 3D-Object and loads in a File.
    3738   \param fileName file to parse and load (must be a .obj file)
    3839*/
     
    6667
    6768/**
    68    \brief deletes an Object
     69   \brief deletes an Object.
     70
     71   Looks if any from object allocated space is still in use, and if so deleted it.
    6972*/
    7073Object::~Object()
     
    115118/**
    116119   \brief Draws the Object number groupNumber
     120   \param groupNumber The number of the group that will be displayed.
     121
    117122   It does this by just calling the List that must have been created earlier.
    118    \param groupNumber The number of the group that will be displayed.
    119123*/
    120124void Object::draw (int groupNumber) const
     
    150154/**
    151155   \brief Draws the Object with a specific groupName
     156   \param groupName The name of the group that will be displayed.
     157
    152158   It does this by just calling the List that must have been created earlier.
    153    \param groupName The name of the group that will be displayed.
    154159*/
    155160void Object::draw (char* groupName) const
     
    183188
    184189/**
    185     \brief initializes the Object
    186     This Function initializes all the needed arrays, Lists and clientStates
     190    \brief initializes the Object.
     191
     192    This Function initializes all the needed arrays, Lists and clientStates.
     193    It also defines default values.
    187194*/
    188195bool Object::initialize (void)
     
    212219/**
    213220   \brief initializes a new Group object
     221   \param group the group that should be initialized.
     222   \todo Maybe Group should be a Class, because it does a lot of stuff
     223   
    214224*/
    215225bool Object::initGroup(Group* group)
     
    229239/**
    230240   \brief initializes a new Face. (sets default Values)
     241   \param face The face to initialize
    231242*/
    232243bool Object::initFace (Face* face)
     
    283294
    284295/**
    285    \brief Cleans up all Faces starting from face.
    286    \param face the first face to clean
     296   \brief Cleans up all Faces starting from face until NULL is reached.
     297   \param face the first face to clean.
    287298*/
    288299bool Object::cleanupFace (Face* face)
     
    448459/**
    449460   \brief parses a group String
     461   \param groupString the new Group to create
     462
    450463   This function initializes a new Group.
    451464   With it you should be able to import .obj-files with more than one Objects inside.
    452    \param groupString the new Group to create
    453465*/
    454466bool Object::readGroup (char* groupString)
     
    474486/**
    475487   \brief parses a vertex-String
     488   \param vertexString The String that will be parsed.
     489
    476490   If a vertex line is found this function will inject it into the vertex-Array
    477    \param vertexString The String that will be parsed.
    478491*/
    479492bool Object::readVertex (char* vertexString)
     
    491504/**
    492505   \brief parses a face-string
     506   \param faceString The String that will be parsed.
     507
    493508   If a face line is found this function will add it to the glList.
    494509   The function makes a difference between QUADS and TRIANGLES, and will if changed re-open, set and re-close the gl-processe.
    495    \param faceString The String that will be parsed.
    496510*/
    497511bool Object::readFace (char* faceString)
     
    554568/**
    555569   \brief parses a vertexNormal-String
     570   \param normalString The String that will be parsed.
     571
    556572   If a vertexNormal line is found this function will inject it into the vertexNormal-Array
    557    \param normalString The String that will be parsed.
    558573*/
    559574bool Object::readVertexNormal (char* normalString)
     
    571586/**
    572587   \brief parses a vertexTextureCoordinate-String
    573    If a vertexTextureCoordinate line is found this function will inject it into the vertexTexture-Array
    574588   \param vTextureString The String that will be parsed.
     589
     590   If a vertexTextureCoordinate line is found,
     591   this function will inject it into the vertexTexture-Array
    575592*/
    576593bool Object::readVertexTexture (char* vTextureString)
     
    588605/**
    589606    \brief Function to read in a mtl File.
    590     this Function parses all Lines of an mtl File
    591607    \param mtlFile The .mtl file to read
     608
     609    This Function parses all Lines of an mtl File.
     610    The reason for it not to be in the materials-class is,
     611    that a material does not have to be able to read itself in from a File.
     612
    592613*/
    593614bool Object::readMtlLib (char* mtlFile)
     
    807828/**
    808829   \brief Adds a Face-element (one vertex of a face) with all its information.
     830   \param elem The FaceElement to add to the OpenGL-environment.
     831
    809832   It does this by searching:
    810833   1. The Vertex itself
     
    812835   3. The VertexTextureCoordinate
    813836   merging this information, the face will be drawn.
    814 
    815837*/
    816838bool Object::addGLElement (FaceElement* elem)
     
    830852/**
    831853   \brief A routine that is able to create normals.
     854
    832855   The algorithm does the following:
    833856   1. It calculates creates Vectors for each normale, and sets them to zero.
     
    910933/**
    911934   \brief Includes a default object
     935
    912936   This will inject a Cube, because this is the most basic object.
    913937*/
    914938void Object::BoxObject(void)
    915939{
    916   readVertex ("-0.500000 -0.500000 0.500000");
    917   readVertex ("0.500000 -0.500000 0.500000");
    918   readVertex ("-0.500000 0.500000 0.500000");
    919   readVertex ("0.500000 0.500000 0.500000");
    920   readVertex ("-0.500000 0.500000 -0.500000");
    921   readVertex ("0.500000 0.500000 -0.500000");
    922   readVertex ("-0.500000 -0.500000 -0.500000");
    923   readVertex ("0.500000 -0.500000 -0.500000");
    924 
    925   readVertexTexture ("0.000000 0.000000");
    926   readVertexTexture ("1.000000 0.000000");
    927   readVertexTexture ("0.000000 1.000000");
    928   readVertexTexture ("1.000000 1.000000");
    929   readVertexTexture ("0.000000 2.000000");
    930   readVertexTexture ("1.000000 2.000000");
    931   readVertexTexture ("0.000000 3.000000");
    932   readVertexTexture ("1.000000 3.000000");
    933   readVertexTexture ("0.000000 4.000000");
    934   readVertexTexture ("1.000000 4.000000");
    935   readVertexTexture ("2.000000 0.000000");
    936   readVertexTexture ("2.000000 1.000000");
    937   readVertexTexture ("-1.000000 0.000000");
    938   readVertexTexture ("-1.000000 1.000000");
    939 
    940   readVertexNormal ("0.000000 0.000000 1.000000");
    941   readVertexNormal ("0.000000 0.000000 1.000000");
    942   readVertexNormal ("0.000000 0.000000 1.000000");
    943   readVertexNormal ("0.000000 0.000000 1.000000");
    944   readVertexNormal ("0.000000 1.000000 0.000000");
    945   readVertexNormal ("0.000000 1.000000 0.000000");
    946   readVertexNormal ("0.000000 1.000000 0.000000");
    947   readVertexNormal ("0.000000 1.000000 0.000000");
    948   readVertexNormal ("0.000000 0.000000 -1.000000");
    949   readVertexNormal ("0.000000 0.000000 -1.000000");
    950   readVertexNormal ("0.000000 0.000000 -1.000000");
    951   readVertexNormal ("0.000000 0.000000 -1.000000");
    952   readVertexNormal ("0.000000 -1.000000 0.000000");
    953   readVertexNormal ("0.000000 -1.000000 0.000000");
    954   readVertexNormal ("0.000000 -1.000000 0.000000");
    955   readVertexNormal ("0.000000 -1.000000 0.000000");
    956   readVertexNormal ("1.000000 0.000000 0.000000");
    957   readVertexNormal ("1.000000 0.000000 0.000000");
    958   readVertexNormal ("1.000000 0.000000 0.000000");
    959   readVertexNormal ("1.000000 0.000000 0.000000");
    960   readVertexNormal ("-1.000000 0.000000 0.000000");
    961   readVertexNormal ("-1.000000 0.000000 0.000000");
    962   readVertexNormal ("-1.000000 0.000000 0.000000");
    963   readVertexNormal ("-1.000000 0.000000 0.000000");
     940  readVertex ("-0.5 -0.5 0.5");
     941  readVertex ("0.5 -0.5 0.5");
     942  readVertex ("-0.5 0.5 0.5");
     943  readVertex ("0.5 0.5 0.5");
     944  readVertex ("-0.5 0.5 -0.5");
     945  readVertex ("0.5 0.5 -0.5");
     946  readVertex ("-0.5 -0.5 -0.5");
     947  readVertex ("0.5 -0.5 -0.5");
     948
     949  readVertexTexture ("0.0 0.0");
     950  readVertexTexture ("1.0 0.0");
     951  readVertexTexture ("0.0 1.0");
     952  readVertexTexture ("1.0 1.0");
     953  readVertexTexture ("0.0 2.0");
     954  readVertexTexture ("1.0 2.0");
     955  readVertexTexture ("0.0 3.0");
     956  readVertexTexture ("1.0 3.0");
     957  readVertexTexture ("0.0 4.0");
     958  readVertexTexture ("1.0 4.0");
     959  readVertexTexture ("2.0 0.0");
     960  readVertexTexture ("2.0 1.0");
     961  readVertexTexture ("-1.0 0.0");
     962  readVertexTexture ("-1.0 1.0");
     963
     964  readVertexNormal ("0.0 0.0 1.0");
     965  readVertexNormal ("0.0 0.0 1.0");
     966  readVertexNormal ("0.0 0.0 1.0");
     967  readVertexNormal ("0.0 0.0 1.0");
     968  readVertexNormal ("0.0 1.0 0.0");
     969  readVertexNormal ("0.0 1.0 0.0");
     970  readVertexNormal ("0.0 1.0 0.0");
     971  readVertexNormal ("0.0 1.0 0.0");
     972  readVertexNormal ("0.0 0.0 -1.0");
     973  readVertexNormal ("0.0 0.0 -1.0");
     974  readVertexNormal ("0.0 0.0 -1.0");
     975  readVertexNormal ("0.0 0.0 -1.0");
     976  readVertexNormal ("0.0 -1.0 0.0");
     977  readVertexNormal ("0.0 -1.0 0.0");
     978  readVertexNormal ("0.0 -1.0 0.0");
     979  readVertexNormal ("0.0 -1.0 0.0");
     980  readVertexNormal ("1.0 0.0 0.0");
     981  readVertexNormal ("1.0 0.0 0.0");
     982  readVertexNormal ("1.0 0.0 0.0");
     983  readVertexNormal ("1.0 0.0 0.0");
     984  readVertexNormal ("-1.0 0.0 0.0");
     985  readVertexNormal ("-1.0 0.0 0.0");
     986  readVertexNormal ("-1.0 0.0 0.0");
     987  readVertexNormal ("-1.0 0.0 0.0");
    964988
    965989  /* normaleLess-testingMode
Note: See TracChangeset for help on using the changeset viewer.