Fixed conversion warnings

This commit is contained in:
Diren D Bharwani 2023-03-07 18:46:36 +08:00
parent cc2afbcf9f
commit 50dafa555a
1 changed files with 4 additions and 4 deletions

View File

@ -375,7 +375,7 @@ namespace SHADE
const SHVec3 LOCAL_FORWARD = SHVec3::Rotate(SHVec3::Forward, rotation); const SHVec3 LOCAL_FORWARD = SHVec3::Rotate(SHVec3::Forward, rotation);
// Rotate the circle // Rotate the circle
SHQuaternion circleOrientation = SHQuaternion::FromEuler(SHVec3(SHMath::DegreesToRadians(90.0), 0.0f, 0.0f)) * rotation; SHQuaternion circleOrientation = SHQuaternion::FromEuler(SHVec3(SHMath::DegreesToRadians(90.0f), 0.0f, 0.0f)) * rotation;
// Compute top and bottom of the cylinder // Compute top and bottom of the cylinder
const SHVec3 HALF_UP = LOCAL_UP * (height * 0.5f); const SHVec3 HALF_UP = LOCAL_UP * (height * 0.5f);
@ -383,7 +383,7 @@ namespace SHADE
const SHVec3 BOT_POS = position - HALF_UP; const SHVec3 BOT_POS = position - HALF_UP;
// Render circles // Render circles
const SHVec3 CIRCLE_SCALE = SHVec3(radius * 2.0f, radius * 2.0, radius * 2.0); const SHVec3 CIRCLE_SCALE = SHVec3(radius * 2.0f, radius * 2.0f, radius * 2.0f);
drawCircle(meshBatch, SHMatrix::Transform(TOP_POS, circleOrientation, CIRCLE_SCALE), color); drawCircle(meshBatch, SHMatrix::Transform(TOP_POS, circleOrientation, CIRCLE_SCALE), color);
drawCircle(meshBatch, SHMatrix::Transform(BOT_POS, circleOrientation, CIRCLE_SCALE), color); drawCircle(meshBatch, SHMatrix::Transform(BOT_POS, circleOrientation, CIRCLE_SCALE), color);
@ -394,7 +394,7 @@ namespace SHADE
drawLine(lineBatch, TOP_POS - LOCAL_FORWARD * radius, BOT_POS - LOCAL_FORWARD * radius, color); drawLine(lineBatch, TOP_POS - LOCAL_FORWARD * radius, BOT_POS - LOCAL_FORWARD * radius, color);
// Render caps // Render caps
const SHVec3 RADIUS_SCALE = SHVec3(radius * 2.0, radius * 2.0f, radius * 2.0); const SHVec3 RADIUS_SCALE = SHVec3(radius * 2.0f, radius * 2.0f, radius * 2.0f);
const SHMatrix TOP_CAP_MAT = SHMatrix::Transform(TOP_POS, rotation, RADIUS_SCALE); const SHMatrix TOP_CAP_MAT = SHMatrix::Transform(TOP_POS, rotation, RADIUS_SCALE);
drawMesh drawMesh
( (
@ -404,7 +404,7 @@ namespace SHADE
const SHMatrix BOT_CAP_MAT = SHMatrix::Transform const SHMatrix BOT_CAP_MAT = SHMatrix::Transform
( (
BOT_POS, BOT_POS,
SHQuaternion::FromEuler(SHVec3(SHMath::DegreesToRadians(180.0), 0.0f, 0.0f)) * rotation, SHQuaternion::FromEuler(SHVec3(SHMath::DegreesToRadians(180.0f), 0.0f, 0.0f)) * rotation,
RADIUS_SCALE RADIUS_SCALE
); );
drawMesh drawMesh