Changed: Changed manual deep-copy of parameter vertex array to usage of memcpy()
This commit is contained in:
@@ -10,12 +10,12 @@
|
||||
|
||||
#include "../include/models/bounding_box.hpp"
|
||||
#include "../include/utils/debug.hpp"
|
||||
#include <cstring>
|
||||
|
||||
BoundingBox::BoundingBox(Vector3 *t_vertices)
|
||||
{
|
||||
//Perform a deep copy of vertex array parameter
|
||||
for (int i = 0; i < 8; i++)
|
||||
_vertices[i] = t_vertices[i];
|
||||
memcpy(_vertices, t_vertices, 8 * sizeof(Vector3));
|
||||
|
||||
//This might be shortened with Vector3 operator overloading, but current
|
||||
//implementation is more human readable.
|
||||
|
||||
Reference in New Issue
Block a user