Cleanup: BKE: Const correctness for BKE_object_dimensions_get

This commit is contained in:
Clément Foucault
2024-11-24 14:54:37 +01:00
parent 35ea495bb6
commit 08ed51d5db
2 changed files with 4 additions and 4 deletions

View File

@@ -342,7 +342,7 @@ void BKE_boundbox_minmax(const BoundBox *bb,
* the evaluated geometry (not just #Object.data).
*/
std::optional<blender::Bounds<blender::float3>> BKE_object_boundbox_get(const Object *ob);
void BKE_object_dimensions_get(Object *ob, float r_vec[3]);
void BKE_object_dimensions_get(const Object *ob, float r_vec[3]);
/**
* Retrieve the bounds of the evaluated object's geometry, stored on the original object as part of
@@ -353,7 +353,7 @@ void BKE_object_dimensions_get(Object *ob, float r_vec[3]);
std::optional<blender::Bounds<blender::float3>> BKE_object_boundbox_eval_cached_get(
const Object *ob);
/** Similar to #BKE_object_boundbox_eval_cached_get but gives the size of the bounds instead. */
void BKE_object_dimensions_eval_cached_get(Object *ob, float r_vec[3]);
void BKE_object_dimensions_eval_cached_get(const Object *ob, float r_vec[3]);
/**
* The original scale and object matrix can be passed in so any difference

View File

@@ -3602,12 +3602,12 @@ static float3 boundbox_to_dimensions(const Object *ob, const std::optional<Bound
return scale * (bounds->max - bounds->min);
}
void BKE_object_dimensions_get(Object *ob, float r_vec[3])
void BKE_object_dimensions_get(const Object *ob, float r_vec[3])
{
copy_v3_v3(r_vec, boundbox_to_dimensions(ob, BKE_object_boundbox_get(ob)));
}
void BKE_object_dimensions_eval_cached_get(Object *ob, float r_vec[3])
void BKE_object_dimensions_eval_cached_get(const Object *ob, float r_vec[3])
{
copy_v3_v3(r_vec, boundbox_to_dimensions(ob, BKE_object_boundbox_eval_cached_get(ob)));
}