forked from bartvdbraak/blender
39fcd3586f
Added newlines at end of a bunch of files that didn't have them. removed a couple of unused variables and an extra ';' (Also removed config.h crap from these files) Kent
38 lines
723 B
C
38 lines
723 B
C
#ifndef POINT_COLLECTOR_H
|
|
#define POINT_COLLECTOR_H
|
|
|
|
#include "DiscreteCollisionDetectorInterface.h"
|
|
|
|
|
|
|
|
struct PointCollector : public DiscreteCollisionDetectorInterface::Result
|
|
{
|
|
|
|
|
|
SimdVector3 m_normalOnBInWorld;
|
|
SimdVector3 m_pointInWorld;
|
|
SimdScalar m_distance;//negative means penetration
|
|
|
|
bool m_hasResult;
|
|
|
|
PointCollector ()
|
|
: m_hasResult(false),m_distance(1e30f)
|
|
{
|
|
}
|
|
|
|
virtual void AddContactPoint(const SimdVector3& normalOnBInWorld,const SimdVector3& pointInWorld,float depth)
|
|
{
|
|
if (depth< m_distance)
|
|
{
|
|
m_hasResult = true;
|
|
m_normalOnBInWorld = normalOnBInWorld;
|
|
m_pointInWorld = pointInWorld;
|
|
//negative means penetration
|
|
m_distance = depth;
|
|
}
|
|
}
|
|
};
|
|
|
|
#endif //POINT_COLLECTOR_H
|
|
|