Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10427 in orxonox.OLD


Ignore:
Timestamp:
Jan 28, 2007, 1:29:11 AM (17 years ago)
Author:
stefalie
Message:

blink: cleanup

Location:
branches/blink/src/world_entities/effects
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/blink/src/world_entities/effects/blink.cc

    r10426 r10427  
    6464  this->toList(OM_COMMON);
    6565
    66   //this->material = new Material();
    67   //this->material->setIllum(0);
    68   //this->material->setDiffuse(1.0,1.0,1.0);
    69   //this->material->setTransparency(0.0);
    70  // this->material->setSpecular(0.0,0.0,0.0);
    71  // this->material->setAmbient(1.0, 1.0, 1.0);
    72   //this->material->setBlendFunc(GL_ZERO,GL_ZERO);
    73   //this->material->setDiffuseMap("pictures/rblink2.png");
    74   //this->material->setDiffuseMap("maps/star_alpha.png");
    75   //this->setAbsCoor(0, 0, 0);d
    76   //this->setVisibiliy(true);
    77   // this->setSize(5, 5);
    78 
    79   //srand((unsigned)time(NULL));
    80 
    81 
    8266  this->bBoard = new Billboard;
    8367  this->bBoard->setVisibiliy(true);
     
    11195  LoadParam(root, "color", this, Blink, setColor);
    11296  LoadParam(root, "omega", this, Blink, setOmega);
    113 //   LoadParam(root, "watersize", this, Blink, setWaterSize);
    114 //   LoadParam(root, "wateruv", this, Blink, setWaterUV);
    115 //   LoadParam(root, "waterflow", this, Blink, setWaterFlow);
    116 //   LoadParam(root, "lightpos", this, Blink, setLightPos);
    117 //   LoadParam(root, "waterangle", this, Blink, setWaterAngle);
    118 //   LoadParam(root, "normalmapscale", this, Blink, setNormalMapScale);
    119 //   LoadParam(root, "shinesize", this, Blink, setShineSize);
    120 //   LoadParam(root, "shinestrength", this, Blink, setShineStrength);
    121 //   LoadParam(root, "reflstrength", this, Blink, setReflStrength);
    122 //   LoadParam(root, "refraction", this, Blink, setRefraction);
    123 //   LoadParam(root, "watercolor", this, Blink, setWaterColor);
    124   /*LoadParam(root, "texture", this->material, Material, setDiffuseMap)
    125       .describe("the texture-file to load onto the Blink");
    126 
    127   LoadParam(root, "size", this, Blink, setSize)
    128   .describe("the size of the Blink in Pixels");*/
    12997}
    13098
     
    142110
    143111  this->blinkStr = sinf(angle);
     112
     113  this->bBoard->colorTexture(Color(color.r(), color.g(), color.b(), 1));
    144114}
    145115
     
    150120void Blink::draw() const
    151121{
    152 //   glPushAttrib(GL_ENABLE_BIT);
    153 //   glEnable(GL_LIGHTING); //glDisable(GL_LIGHTING);
    154 //   glDisable(GL_FOG);
    155 //   glMatrixMode(GL_MODELVIEW);
    156 //   glPushMatrix();
    157122
    158 //   Vector pos = this->getAbsCoor();
    159 //   Vector dir = pos - State::getCameraNode()->getAbsCoor();
    160 //   dir.normalize();
    161 //
    162 //   Vector up = Vector(0, 1, 0);
    163 //   Vector h = dir.cross(up);
    164 //
    165 //   Vector pos = this->getAbsCoor();
    166 //   glTranslatef(pos.x, pos.y, pos.z);
    167 
    168     /* translate */
    169 //     glTranslatef (this->getAbsCoor ().x,
    170 //                   this->getAbsCoor ().y,
    171 //                   this->getAbsCoor ().z);
    172 //     Vector tmpRot = this->getAbsDir().getSpacialAxis();
    173 //     glRotatef (this->getAbsDir().getSpacialAxisAngle(), tmpRot.x, tmpRot.y, tmpRot.z );
    174 
    175 //   glBlendFunc(GL_SRC_ALPHA,GL_ONE); // Set The Blending Function For Translucency
    176 //   glEnable(GL_BLEND);
    177 //   glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
    178 //   glShadeModel(GL_SMOOTH);
    179 
    180 /*
    181   Vector camCoor = State::getCameraNode()->getAbsCoor();
    182   Vector diff = camCoor - this->position;
    183 
    184 
    185   //glTranslatef(position.x + size/2, position.y + size/2, position.z);
    186 
    187   glTranslatef(this->position.x - this->size/2, this->position.y - this->size/2, this->position.z);*/
    188 
    189 //   Vector view = this->getAbsCoor() - State::getCameraNode()->getAbsCoor();
    190 //   view.normalize();
    191 //
    192 //   Vector up = Vector(0, 1, 0);
    193 //   Vector h = view.cross(up);
    194 
    195   //this->material->select();
    196 //   PRINTF(0)("\n\n\n\n::%f,%f,%f\n\n\n\n", color.r(), color.g(), color.b());
    197   this->bBoard->colorTexture(Color(color.r(), color.g(), color.b(), 1));
    198 
    199   glPopMatrix();
    200   glPopAttrib();
    201123}
  • branches/blink/src/world_entities/effects/blink.h

    r10425 r10427  
    2828    void setOmega(float w) { this->omega = w; }
    2929    void setColor(float r, float g, float b) { this->color = Color(r/255, g/255, b/255); }
    30     //void setTexture(const std::string& textureFile);
    3130
    3231    virtual void tick(float dt);
     
    3433
    3534  private:
    36     //Material*         material;
    3735    Billboard*        bBoard;
    3836    Vector            position;
Note: See TracChangeset for help on using the changeset viewer.