Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 26, 2011, 5:08:09 PM (13 years ago)
Author:
kmaurus
Message:

endversion

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/spaceboundaries2/src/orxonox/worldentities/SpaceBoundaries.cc

    r8604 r8609  
    5858        this->centerRadar_ = new RadarViewable(this, this);
    5959        this->centerRadar_->setRadarObjectShape(RadarViewable::Dot);
    60         this->centerRadar_->setRadarVisibility(false);\
    61        
    62         // FOLGENDER BLOCK: TO REMOVE (DEBUGGING)
    63         constBilly = new Billboard(this);
    64         Vector3 pos = Vector3(-10, -10, -10);
    65         constBilly->setPosition(pos);
    66         setBillboardOptions(constBilly, pos);
     60        this->centerRadar_->setRadarVisibility(false);
    6761    }
    6862    SpaceBoundaries::~SpaceBoundaries()
     
    8074        }
    8175        this->billboards_.clear();
    82        
    83         delete constBilly; // TO REMOVE (DEBUGGING)
    8476    }
    8577   
     
    123115            Billboard *tmp = new Billboard(this);
    124116            tmp->setPosition(position);
    125             this->setBillboardOptions( tmp, position);
     117            this->setBillboardOptions( tmp );
     118            Vector3 normalisedVec = (position - this->getPosition()).normalisedCopy(); /* Vektor von Kugelmitte nach aussen */
     119            tmp->setCommonDirection ( -1.0 * normalisedVec );
     120            tmp->setCommonUpVector( Vector3::UNIT_Z );
    126121            billboardAdministration tmp2 = { true, tmp };
    127122            this->billboards_.push_back( tmp2 );
    128            
    129123        } else {
    130124            current->billy->setPosition(position);
    131125            current->billy->setVisible(true);
    132126            current->usedYet = true;
    133         }
    134     }
    135    
    136     void SpaceBoundaries::setBillboardOptions(Billboard *billy, Vector3 position)
     127            Vector3 normalisedVec = (position - this->getPosition()).normalisedCopy(); /* Vektor von Kugelmitte nach aussen */
     128            current->billy->setCommonDirection ( -1.0 * normalisedVec );
     129            current->billy->setCommonUpVector( Vector3::UNIT_Z );
     130        }
     131    }
     132   
     133    void SpaceBoundaries::setBillboardOptions(Billboard *billy)
    137134    {
    138135        if(billy != NULL)
     
    140137            billy->setMaterial("Grid");
    141138            billy->setBillboardType(Ogre::BBT_PERPENDICULAR_COMMON);
    142             Vector3 normalisedVec = (position - this->getPosition()).normalisedCopy(); /* Vektor von Kugelmitte nach aussen */
    143             billy->setCommonDirection ( -1.0 * normalisedVec );
    144             billy->setCommonUpVector( Vector3::UNIT_Z ); // (normalisedVec.crossProduct(Vector3::UNIT_X)).normalisedCopy() );
    145139            billy->setDefaultDimensions(150, 150);
    146140            billy->setVisible(true);
     
    275269    void SpaceBoundaries::displayWarning(const std::string warnText)
    276270    {   
    277        
     271        // TODO
    278272    }
    279273   
Note: See TracChangeset for help on using the changeset viewer.