consistency

This commit is contained in:
Irlan
2018-06-29 22:52:21 -03:00
parent db54750a87
commit 2af8cff389
9 changed files with 23 additions and 31 deletions

View File

@@ -352,7 +352,7 @@ void b3Cloth::RayCast(b3RayCastListener* listener, const b3RayCastInput* input)
{
for (u32 i = 0; i < m_mesh->triangleCount; ++i)
{
b3ClothRayCastSingleOutput subOutput;
b3RayCastSingleClothOutput subOutput;
if (RayCast(&subOutput, input, i))
{
float32 newFraction = listener->ReportCloth(subOutput.cloth, subOutput.point, subOutput.normal, subOutput.fraction, subOutput.triangle);
@@ -366,7 +366,7 @@ void b3Cloth::RayCast(b3RayCastListener* listener, const b3RayCastInput* input)
}
}
bool b3Cloth::RayCastSingle(b3ClothRayCastSingleOutput* output, const b3Vec3& p1, const b3Vec3& p2) const
bool b3Cloth::RayCastSingle(b3RayCastSingleClothOutput* output, const b3Vec3& p1, const b3Vec3& p2) const
{
b3RayCastInput input;
input.p1 = p1;
@@ -378,7 +378,7 @@ bool b3Cloth::RayCastSingle(b3ClothRayCastSingleOutput* output, const b3Vec3& p1
for (u32 i = 0; i < m_mesh->triangleCount; ++i)
{
b3ClothRayCastSingleOutput subOutput;
b3RayCastSingleClothOutput subOutput;
if (RayCast(&subOutput, &input, i))
{
if (subOutput.fraction < output->fraction)
@@ -396,7 +396,7 @@ bool b3Cloth::RayCastSingle(b3ClothRayCastSingleOutput* output, const b3Vec3& p1
return false;
}
bool b3Cloth::RayCast(b3ClothRayCastSingleOutput* output, const b3RayCastInput* input, u32 triangleIndex) const
bool b3Cloth::RayCast(b3RayCastSingleClothOutput* output, const b3RayCastInput* input, u32 triangleIndex) const
{
B3_ASSERT(triangleIndex < m_mesh->triangleCount);
b3ClothMeshTriangle* triangle = m_mesh->triangles + triangleIndex;

View File

@@ -426,7 +426,7 @@ void b3World::RayCastShape(b3RayCastListener* listener, const b3Vec3& p1, const
m_contactMan.m_broadPhase.RayCast(&callback, input);
}
struct b3ShapeRayCastSingleCallback
struct b3RayCastSingleShapeCallback
{
float32 Report(const b3RayCastInput& input, u32 proxyId)
{
@@ -458,14 +458,14 @@ struct b3ShapeRayCastSingleCallback
const b3BroadPhase* broadPhase;
};
bool b3World::RayCastSingleShape(b3ShapeRayCastSingleOutput* output, const b3Vec3& p1, const b3Vec3& p2) const
bool b3World::RayCastSingleShape(b3RayCastSingleShapeOutput* output, const b3Vec3& p1, const b3Vec3& p2) const
{
b3RayCastInput input;
input.p1 = p1;
input.p2 = p2;
input.maxFraction = 1.0f;
b3ShapeRayCastSingleCallback callback;
b3RayCastSingleShapeCallback callback;
callback.shape0 = NULL;
callback.output0.fraction = B3_MAX_FLOAT;
callback.broadPhase = &m_contactMan.m_broadPhase;
@@ -504,7 +504,7 @@ void b3World::RayCastCloth(b3RayCastListener* listener, const b3Vec3& p1, const
}
}
bool b3World::RayCastSingleCloth(b3ClothRayCastSingleOutput* output, const b3Vec3& p1, const b3Vec3& p2) const
bool b3World::RayCastSingleCloth(b3RayCastSingleClothOutput* output, const b3Vec3& p1, const b3Vec3& p2) const
{
output->cloth = NULL;
output->triangle = ~0;
@@ -512,7 +512,7 @@ bool b3World::RayCastSingleCloth(b3ClothRayCastSingleOutput* output, const b3Vec
for (b3Cloth* c = m_clothList.m_head; c; c = c->m_next)
{
b3ClothRayCastSingleOutput subOutput;
b3RayCastSingleClothOutput subOutput;
if (c->RayCastSingle(&subOutput, p1, p2))
{
if (subOutput.fraction < output->fraction)