more cast coding standard fixes

This commit is contained in:
Brad Hefta-Gaub 2014-01-09 19:00:57 -08:00
parent cdb4b8c5f3
commit 5787d3d9e9

View file

@ -572,7 +572,7 @@ bool findRayIntersectionOp(OctreeElement* node, void* extraData) {
bool Octree::findRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
OctreeElement*& node, float& distance, BoxFace& face) {
RayArgs args = { origin / static_cast<float>(TREE_SCALE), direction, node, distance, face };
RayArgs args = { origin / (float)(TREE_SCALE), direction, node, distance, face };
recurseTreeWithOperation(findRayIntersectionOp, &args);
return args.found;
}
@ -600,7 +600,7 @@ bool findSpherePenetrationOp(OctreeElement* element, void* extraData) {
if (element->hasContent()) {
glm::vec3 elementPenetration;
if (element->findSpherePenetration(args->center, args->radius, elementPenetration, &args->penetratedObject)) {
args->penetration = addPenetrations(args->penetration, elementPenetration * static_cast<float>(TREE_SCALE));
args->penetration = addPenetrations(args->penetration, elementPenetration * (float)(TREE_SCALE));
args->found = true;
}
}
@ -611,8 +611,8 @@ bool Octree::findSpherePenetration(const glm::vec3& center, float radius, glm::v
void** penetratedObject) {
SphereArgs args = {
center / static_cast<float>(TREE_SCALE),
radius / static_cast<float>(TREE_SCALE),
center / (float)(TREE_SCALE),
radius / (float)(TREE_SCALE),
penetration,
false,
NULL };
@ -647,7 +647,7 @@ bool findCapsulePenetrationOp(OctreeElement* node, void* extraData) {
if (node->hasContent()) {
glm::vec3 nodePenetration;
if (box.findCapsulePenetration(args->start, args->end, args->radius, nodePenetration)) {
args->penetration = addPenetrations(args->penetration, nodePenetration * static_cast<float>(TREE_SCALE));
args->penetration = addPenetrations(args->penetration, nodePenetration * (float)(TREE_SCALE));
args->found = true;
}
}
@ -656,9 +656,9 @@ bool findCapsulePenetrationOp(OctreeElement* node, void* extraData) {
bool Octree::findCapsulePenetration(const glm::vec3& start, const glm::vec3& end, float radius, glm::vec3& penetration) {
CapsuleArgs args = {
start / static_cast<float>(TREE_SCALE),
end / static_cast<float>(TREE_SCALE),
radius / static_cast<float>(TREE_SCALE),
start / (float)(TREE_SCALE),
end / (float)(TREE_SCALE),
radius / (float)(TREE_SCALE),
penetration };
penetration = glm::vec3(0.0f, 0.0f, 0.0f);
recurseTreeWithOperation(findCapsulePenetrationOp, &args);