firefox extension testing
Dont mind me.
Code:
#ifndef CHARACTER_H
#define CHARACTER_H
#include "sprite.h"
struct keyMap
{
char up;
char down;
char left;
char right;
char attack;
};
class Character : public Sprite
{
public:
Character(Level *l, DrawEngine *de, int s_index, float x = 1, float y = 1, int lives = 3);
virtual bool keyPress(char c);
virtual void addLives(int nlives = 1);
keyMap keys;
protected:
private:
};
#endif
Re: firefox extension testing
Re: firefox extension testing
Re: firefox extension testing
Re: firefox extension testing
Code:
bool InsidePolygon(CVector3 vIntersection, CVector3 Poly[], long verticeCount){
const double MATCH_FACTOR = 0.9999; // Used to cover up the error in floating point
double Angle = 0.0; // Initialize the angle
CVector3 vA, vB; // Create temp vectors
for (int i = 0; i < verticeCount; i++) // Go in a circle to each vertex and get the angle between
{
vA = Vector(Poly[i], vIntersection); // Subtract the intersection point from the current vertex
// Subtract the point from the next vertex
vB = Vector(Poly[(i + 1) % verticeCount], vIntersection);
Angle += AngleBetweenVectors(vA, vB); // Find the angle between the 2 vectors and add them all up as we go along
}
if(Angle >= (MATCH_FACTOR * (2.0 * PI)) ) // If the angle is greater than 2 PI, (360 degrees)
return true; // The point is inside of the polygon
return false; // If you get here, it obviously wasn't inside the polygon, so Return FALSE
}
Re: firefox extension testing
Re: firefox extension testing
Ohhh...was that a bug...let me test again...
Works like a charm....:)
Workslikeacharm......:)
Workslikeacharm...:)
Re: firefox extension testing
It takes away the spaces...:)
Re: firefox extension testing
Quote:
Originally Posted by NoteMe
It takes away the spaces...:)
Thief! :mad:
Re: firefox extension testing
Re: firefox extension testing
Re: firefox extension testing
Its the forum itself that is stripping out the spaces after submitting.
Ill have to come up with a workaroun d if I can.
Re: firefox extension testing
Waiting with baited breath.
Re: firefox extension testing
Already been fixed wossy. Just see the thread in Chit Chat.