BGE Scenegraph clean up: double-promotion warnings
This commit is contained in:
@@ -41,7 +41,7 @@ SG_Tree::SG_Tree() :
|
||||
m_left(NULL),
|
||||
m_right(NULL),
|
||||
m_parent(NULL),
|
||||
m_radius(0.0),
|
||||
m_radius(0.0f),
|
||||
m_client_object(NULL)
|
||||
{
|
||||
}
|
||||
@@ -62,7 +62,7 @@ SG_Tree::SG_Tree(SG_Tree* left, SG_Tree* right) :
|
||||
m_bbox += m_right->m_bbox;
|
||||
m_right->m_parent = this;
|
||||
}
|
||||
m_center = (m_bbox.m_min + m_bbox.m_max)/2.0;
|
||||
m_center = (m_bbox.m_min + m_bbox.m_max)/2.0f;
|
||||
m_radius = (m_bbox.m_max - m_bbox.m_min).length();
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ SG_Tree::SG_Tree(SG_Node* client) :
|
||||
m_client_object(client)
|
||||
{
|
||||
m_bbox = SG_BBox(client->BBox(), client->GetWorldTransform());
|
||||
m_center = (m_bbox.m_min + m_bbox.m_max)/2.0;
|
||||
m_center = (m_bbox.m_min + m_bbox.m_max)/2.0f;
|
||||
m_radius = (m_bbox.m_max - m_bbox.m_min).length();
|
||||
}
|
||||
|
||||
@@ -162,7 +162,7 @@ void SG_Tree::SetLeft(SG_Tree *left)
|
||||
{
|
||||
m_left = left;
|
||||
m_bbox += left->m_bbox;
|
||||
m_center = (m_bbox.m_min + m_bbox.m_max)/2.0;
|
||||
m_center = (m_bbox.m_min + m_bbox.m_max)/2.0f;
|
||||
m_radius = (m_bbox.m_max - m_bbox.m_min).length();
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ void SG_Tree::SetRight(SG_Tree *right)
|
||||
{
|
||||
m_right = right;
|
||||
m_bbox += right->m_bbox;
|
||||
m_center = (m_bbox.m_min + m_bbox.m_max)/2.0;
|
||||
m_center = (m_bbox.m_min + m_bbox.m_max)/2.0f;
|
||||
m_radius = (m_bbox.m_max - m_bbox.m_min).length();
|
||||
}
|
||||
|
||||
@@ -263,7 +263,7 @@ SG_Tree* SG_TreeFactory::MakeTreeDown(SG_BBox &bbox)
|
||||
return root;
|
||||
}
|
||||
|
||||
if (bbox.volume() < 1.0)
|
||||
if (bbox.volume() < 1.0f)
|
||||
return MakeTreeUp();
|
||||
|
||||
SG_TreeFactory lefttree;
|
||||
|
||||
Reference in New Issue
Block a user