bool Triangle::intersects(Triangle t2)
	{
	vector3df outIntersection;
	if(getIntersectionWithLimitedLine (line3df(t2.pointA,t2.pointB),outIntersection))
		return true;
	if(getIntersectionWithLimitedLine (line3df(t2.pointA,t2.pointB),outIntersection))
		return true;
	if(getIntersectionWithLimitedLine (line3df(t2.pointA,t2.pointB),outIntersection))
		return true;
	#if 0
	if(isPointInside(t2.pointA))
		return true;
	if(isPointInside(t2.pointB))
		return true;
	if(isPointInside(t2.pointC))
		return true;
	#endif
	return false;
	}
Example #2
0
Game::Game() : 
enemyField(ENEMY_FIELD_SIZE),
	fighterLine(line3df(FIGHTER_LINE_SIZE)), 
	enemies(new EnemyHolder()), 
	fighter(new Fighter()), 
	rockets(new RocketHolder()), 
	gui(new GUI()),
	effects(new Effect()),
	texManager(new TextureManager()),
	engine(new Irrlicht(L"Space Battle", dimension2du(WINDOW_WIDTH, WINDOW_HEIGHT))), 
	state(MENU), 
	sound(createIrrKlangDevice()), 
	score(0), 
	soundPlay(true)
{
	srand(time(NULL));
}