| Line |   | 
|---|
| 1 |  | 
|---|
| 2 |  | 
|---|
| 3 | /*  | 
|---|
| 4 |    orxonox - the future of 3D-vertical-scrollers | 
|---|
| 5 |  | 
|---|
| 6 |    Copyright (C) 2004 orx | 
|---|
| 7 |  | 
|---|
| 8 |    This program is free software; you can redistribute it and/or modify | 
|---|
| 9 |    it under the terms of the GNU General Public License as published by | 
|---|
| 10 |    the Free Software Foundation; either version 2, or (at your option) | 
|---|
| 11 |    any later version. | 
|---|
| 12 |  | 
|---|
| 13 |    ### File Specific: | 
|---|
| 14 |    main-programmer: Patrick Boenzli | 
|---|
| 15 |    co-programmer: | 
|---|
| 16 | */ | 
|---|
| 17 |  | 
|---|
| 18 |  | 
|---|
| 19 | #include "npc.h" | 
|---|
| 20 |  | 
|---|
| 21 | #include <iostream> | 
|---|
| 22 |  | 
|---|
| 23 |  | 
|---|
| 24 | using namespace std; | 
|---|
| 25 |  | 
|---|
| 26 |  | 
|---|
| 27 | NPC::NPC () {} | 
|---|
| 28 |  | 
|---|
| 29 | NPC::~NPC () {} | 
|---|
| 30 |  | 
|---|
| 31 |  | 
|---|
| 32 | void NPC::setPosition(float x, float y, float z) | 
|---|
| 33 | { | 
|---|
| 34 |   xCor = x; yCor = y; zCor = z; | 
|---|
| 35 | } | 
|---|
| 36 |  | 
|---|
| 37 | void NPC::getPosition(float* x, float* y, float* z)  | 
|---|
| 38 | { | 
|---|
| 39 |   *x = xCor;  | 
|---|
| 40 |   *y = yCor;  | 
|---|
| 41 |   *z = zCor; | 
|---|
| 42 | } | 
|---|
| 43 |  | 
|---|
| 44 | void NPC::setCollisionRadius(float r)  | 
|---|
| 45 | { | 
|---|
| 46 |   collisionRadius = r; | 
|---|
| 47 | } | 
|---|
| 48 |  | 
|---|
| 49 | float NPC::getCollisionRadius()  | 
|---|
| 50 | { | 
|---|
| 51 |   return collisionRadius; | 
|---|
| 52 | } | 
|---|
| 53 |  | 
|---|
| 54 |  | 
|---|
| 55 | void NPC::addAI(AI* ai) | 
|---|
| 56 | { | 
|---|
| 57 |  | 
|---|
| 58 | } | 
|---|
| 59 |  | 
|---|
| 60 |  | 
|---|
| 61 | void NPC::drawNPC(void)  | 
|---|
| 62 | { | 
|---|
| 63 |   glPushMatrix(); | 
|---|
| 64 |   glTranslatef(xCor, yCor, 3.0); | 
|---|
| 65 |   //glScalef(1.0, 3.0, 1.0); | 
|---|
| 66 |   glutWireSphere(1.0, 10, 10); | 
|---|
| 67 |   glPopMatrix(); | 
|---|
| 68 |   //cout << "Player::drawNPC()" << endl; | 
|---|
| 69 | } | 
|---|
       
      
      Note: See 
TracBrowser
        for help on using the repository browser.