mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 22:10:32 +02:00
more cast coding standard fixes
This commit is contained in:
parent
cdb4b8c5f3
commit
5787d3d9e9
1 changed files with 87 additions and 87 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue