Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 1, 2015, 8:57:37 PM (10 years ago)
Author:
landauf
Message:

cleanup

Location:
code/branches/hudHS14/src/modules/overlays/hud
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/hudHS14/src/modules/overlays/hud/HUDEnemyHealthBar.cc

    r10143 r10241  
    3131#include "core/config/ConfigValueIncludes.h"
    3232#include "worldentities/pawns/Pawn.h"
    33 #include "graphics/Camera.h"
    3433
    3534namespace orxonox
     
    5857        this->updateTarget();
    5958
    60 
    61 
    62 /*
    63 //--------------------------------------------------------------------------
    64         //first try to place a healthbar under the enemy ship
    65         //getting all the parameters (direction, position, angle) to place the health bar on the screen
    66 
    67         Camera* camera = this->owner_->getCamera();
    68 
    69         //position and orientation relative to the root space
    70         Vector3 cameraPosition = camera->getWorldPosition();
    71         Quaternion cameraOrientation = camera->getWorldOrientation();
    72 
    73         Vector3 cameraDirection = camera->FRONT;
    74         Vector3 cameraOrthonormal = camera->UP;
    75 
    76         //get target
    77         //if there is one get it's position (relative to the root space(
    78         WorldEntity* target = this->owner_->getTarget();
    79 
    80         if(target != NULL){
    81         Vector3 targetPosition = target->getWorldPosition();
    82 
    83 
    84         //try 1
    85         Vector2 screenCoordinates = get2DViewcoordinates(cameraPosition, cameraOrientation * WorldEntity::FRONT, cameraOrientation * WorldEntity::UP, targetPosition);
    86 
    87         orxout() << screenCoordinates.x << endl;
    88 
    89         //shift coordinates because the screen has it's root in the upper left corner (0,0) but get2Dviewcoordiantes return values between -0.5 and 0.5
    90         screenCoordinates.x += 0.5;
    91         screenCoordinates.y += 0.5;
    92         orxout() << screenCoordinates.x << endl;
    93 
    94         this->setPosition(screenCoordinates);
    95 
    96         this->setTextOffset(screenCoordinates);
    97         }
    98         //--------------------------------------------------------------------------
    99 */
    100 
    101 
    102 
    10359        SUPER(HUDEnemyHealthBar, tick, dt);
    10460    }
     
    11571                target = target->getParent();
    11672            pawn = orxonox_cast<Pawn*>(target);
    117 
    118 
    11973            // Don't show the HealthBar if the pawn is invisible
    12074            if (pawn && !pawn->isVisible())
    12175                pawn = NULL;
    12276        }
    123 
    12477        // Set the pawn as owner of the HealthBar
    12578        this->setHealthBarOwner(pawn);
  • code/branches/hudHS14/src/modules/overlays/hud/HUDHealthBar.cc

    r10110 r10241  
    8383        SUPER(HUDHealthBar, tick, dt);
    8484
    85 
    86 
    87 
    88 
    8985        if (this->owner_)
    9086        {
Note: See TracChangeset for help on using the changeset viewer.