mirror of
https://github.com/zoriya/Bomberman.git
synced 2025-12-20 13:25:10 +00:00
add wires + bounding box drawing for 3D shapes/Models
This commit is contained in:
@@ -114,6 +114,20 @@ namespace RAY::Drawables::Drawables3D
|
||||
this->_color);
|
||||
}
|
||||
|
||||
void Model::drawWiresOn(RAY::Window &)
|
||||
{
|
||||
if (this->_model->meshCount) {
|
||||
::BoundingBox box = GetMeshBoundingBox(*this->_model->meshes);
|
||||
box.min.x += this->_position.x;
|
||||
box.min.y += this->_position.y;
|
||||
box.min.z += this->_position.z;
|
||||
box.max.x += this->_position.x;
|
||||
box.max.y += this->_position.y;
|
||||
box.max.z += this->_position.z;
|
||||
DrawBoundingBox(box, GREEN);
|
||||
}
|
||||
}
|
||||
|
||||
void Model::setShader(const RAY::Shader &shader)
|
||||
{
|
||||
this->_originalShader = this->_model->materials[0].shader;
|
||||
|
||||
Reference in New Issue
Block a user