Fixed line endings.

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@4795 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
hikerstk 2010-02-22 12:15:36 +00:00
parent f41150eae7
commit cd68ac9250
2 changed files with 47 additions and 47 deletions

View File

@ -30,42 +30,42 @@ IrrDebugDrawer::IrrDebugDrawer()
/** Activates the debug view. It makes all karts invisible (in irrlicht), so
* that the bullet view can be seen.
*/
void IrrDebugDrawer::activate()
{
World *world = World::getWorld();
unsigned int num_karts = world->getNumKarts();
for(unsigned int i=0; i<num_karts; i++)
{
Kart *kart = world->getKart(i);
if(kart->isEliminated()) continue;
kart->getNode()->setVisible(false);
}
} // activate
void IrrDebugDrawer::activate()
{
World *world = World::getWorld();
unsigned int num_karts = world->getNumKarts();
for(unsigned int i=0; i<num_karts; i++)
{
Kart *kart = world->getKart(i);
if(kart->isEliminated()) continue;
kart->getNode()->setVisible(false);
}
} // activate
// -----------------------------------------------------------------------------
/** Deactivates the bullet debug view, and makes all karts visible again.
*/
void IrrDebugDrawer::deactivate()
{
World *world = World::getWorld();
unsigned int num_karts = world->getNumKarts();
for(unsigned int i=0; i<num_karts; i++)
{
Kart *kart = world->getKart(i);
if(kart->isEliminated()) continue;
kart->getNode()->setVisible(true);
}
} // deactivate
void IrrDebugDrawer::deactivate()
{
World *world = World::getWorld();
unsigned int num_karts = world->getNumKarts();
for(unsigned int i=0; i<num_karts; i++)
{
Kart *kart = world->getKart(i);
if(kart->isEliminated()) continue;
kart->getNode()->setVisible(true);
}
} // deactivate
// -----------------------------------------------------------------------------
void IrrDebugDrawer::drawLine(const btVector3& from, const btVector3& to,
const btVector3& color)
{
Vec3 f(from);
Vec3 t(to);
video::SColor c(255, (int)(color.getX()*255), (int)(color.getY()*255),
(int)(color.getZ()*255) );
irr_driver->getVideoDriver()->draw3DLine(f.toIrrVector(),
t.toIrrVector(), c);
}
void IrrDebugDrawer::drawLine(const btVector3& from, const btVector3& to,
const btVector3& color)
{
Vec3 f(from);
Vec3 t(to);
video::SColor c(255, (int)(color.getX()*255), (int)(color.getY()*255),
(int)(color.getZ()*255) );
irr_driver->getVideoDriver()->draw3DLine(f.toIrrVector(),
t.toIrrVector(), c);
}
/* EOF */

View File

@ -36,21 +36,21 @@ class IrrDebugDrawer : public btIDebugDraw
public:
IrrDebugDrawer();
void render(float dt);
/** Draws a line. */
virtual void drawLine(const btVector3& from, const btVector3& to,
const btVector3& color);
///optional debug methods
virtual void drawContactPoint(const btVector3& Point_on_b,
const btVector3& normal_on_b,
btScalar distance,int life_time,
const btVector3& color) {}
virtual void reportErrorWarning(const char* warningString) {}
virtual void draw3dText(const btVector3& location,
const char* textString) {}
virtual void setDebugMode(int debug_mode) { m_debug_mode = debug_mode; }
virtual int getDebugMode() const { return m_debug_mode; }
void activate();
void deactivate();
/** Draws a line. */
virtual void drawLine(const btVector3& from, const btVector3& to,
const btVector3& color);
///optional debug methods
virtual void drawContactPoint(const btVector3& Point_on_b,
const btVector3& normal_on_b,
btScalar distance,int life_time,
const btVector3& color) {}
virtual void reportErrorWarning(const char* warningString) {}
virtual void draw3dText(const btVector3& location,
const char* textString) {}
virtual void setDebugMode(int debug_mode) { m_debug_mode = debug_mode; }
virtual int getDebugMode() const { return m_debug_mode; }
void activate();
void deactivate();
}; // IrrDebugDrawer