Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2842 in orxonox.OLD for orxonox/trunk/importer/material.cc


Ignore:
Timestamp:
Nov 12, 2004, 6:51:15 PM (21 years ago)
Author:
bensch
Message:

orxonox/trunk/importer: doxygen tags added

File:
1 edited

Legend:

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

    r2837 r2842  
    1616#include "material.h"
    1717
     18/**
     19   \brief creates a default Material with no Name
     20   normally you call this to create a material List (for an obj-file) and then append with addMaterial()
     21*/
    1822Material::Material()
    1923{
     
    2327}
    2428
     29/**
     30   \brief creates a Material.
     31   \param mtlName Name of the Material to be added to the Material List
     32*/
    2533Material::Material (char* mtlName)
    2634{
     
    3038}
    3139
     40/**
     41   \brief adds a new Material to the List.
     42   this Function will append a new Material to the end of a Material List.
     43   \param mtlName The name of the Material to be added.
     44*/
    3245Material* Material::addMaterial(char* mtlName)
    3346{
     
    4558}
    4659
     60/**
     61   \brief initializes a new Material with its default Values
     62*/
    4763void Material::init(void)
    4864{
     
    6076}
    6177
    62 
     78/**
     79   \brief Set the Name of the Material. (Important for searching)
     80   \param mtlName the Name of the Material to be set.
     81*/
    6382void Material::setName (char* mtlName)
    6483{
     
    6988
    7089}
     90/**
     91   \returns The Name of The Material
     92*/
    7193char* Material::getName (void)
    7294{
     
    7496}
    7597
    76 
     98/**
     99   \brief Sets the Material Illumination Model.
     100   \brief illu illumination Model in int form
     101*/
    77102void Material::setIllum (int illum)
    78103{
     
    82107  //  printf ("setting illumModel to: %i\n", illumModel);
    83108}
    84 void Material::setIllum (char* illum)
     109/**
     110   \brief Sets the Material Illumination Model.
     111   \brief illu illumination Model in char* form
     112*/void Material::setIllum (char* illum)
    85113{
    86114  setIllum (atoi(illum));
    87115}
    88116
     117/**
     118   \brief Sets the Material Diffuse Color.
     119   \param r Red Color Channel.
     120   \param g Green Color Channel.
     121   \param b Blue Color Channel.
     122*/
    89123void Material::setDiffuse (float r, float g, float b)
    90124{
     
    97131
    98132}
     133/**
     134   \brief Sets the Material Diffuse Color.
     135   \param rgb The red, green, blue channel in char format (with spaces between them)
     136*/
    99137void Material::setDiffuse (char* rgb)
    100138{
     
    104142}
    105143
     144/**
     145   \brief Sets the Material Ambient Color.
     146   \param r Red Color Channel.
     147   \param g Green Color Channel.
     148   \param b Blue Color Channel.
     149*/
    106150void Material::setAmbient (float r, float g, float b)
    107151{
     
    113157  ambient[3] = 1.0;
    114158}
     159/**
     160   \brief Sets the Material Ambient Color.
     161   \param rgb The red, green, blue channel in char format (with spaces between them)
     162*/
    115163void Material::setAmbient (char* rgb)
    116164{
     
    120168}
    121169
     170/**
     171   \brief Sets the Material Specular Color.
     172   \param r Red Color Channel.
     173   \param g Green Color Channel.
     174   \param b Blue Color Channel.
     175*/
    122176void Material::setSpecular (float r, float g, float b)
    123177{
     
    129183  specular[3] = 1.0;
    130184 }
     185/**
     186   \brief Sets the Material Specular Color.
     187   \param rgb The red, green, blue channel in char format (with spaces between them)
     188*/
    131189void Material::setSpecular (char* rgb)
    132190{
     
    136194}
    137195
     196/**
     197   \brief Sets the Material Shininess.
     198   \param shini stes the Shininess from float.
     199*/
    138200void Material::setShininess (float shini)
    139201{
    140202  shininess = shini;
    141203}
     204/**
     205   \brief Sets the Material Shininess.
     206   \param shini stes the Shininess from char*.
     207*/
    142208void Material::setShininess (char* shini)
    143209{
     
    145211}
    146212
     213/**
     214   \brief Sets the Material Transparency.
     215   \param trans stes the Transparency from int.
     216*/
    147217void Material::setTransparency (float trans)
    148218{
     
    151221  transparency = trans;
    152222}
     223/**
     224   \brief Sets the Material Transparency.
     225   \param trans stes the Transparency from char*.
     226*/
    153227void Material::setTransparency (char* trans)
    154228{
     
    158232}
    159233
    160 
     234/**
     235   \brief Search for a Material called mtlName
     236   \param mtlName the Name of the Material to search for
     237   \returns Material named mtlName if it is found. NULL otherwise.
     238*/
    161239Material* Material::search (char* mtlName)
    162240{
     
    179257}
    180258
     259/**
     260   \brief sets the material with which the following Faces will be painted
     261*/
    181262bool Material::select (void)
    182263{
Note: See TracChangeset for help on using the changeset viewer.