20std::shared_ptr<Geometry::MeshObject>
MeshFileIO::rotate(std::shared_ptr<Geometry::MeshObject> environmentMesh,
21 double xRotation,
double yRotation,
double zRotation) {
23 environmentMesh->rotate(rotationMatrix);
24 return environmentMesh;
33std::shared_ptr<Geometry::MeshObject>
MeshFileIO::translate(std::shared_ptr<Geometry::MeshObject> environmentMesh,
34 const std::vector<double> &translationVector) {
35 std::vector<double> checkVector = std::vector<double>(3, 0.0);
36 if (translationVector != checkVector) {
37 if (translationVector.size() != 3) {
38 throw std::invalid_argument(
"Invalid Translation vector, must have exactly 3 dimensions");
41 createScaledV3D(translationVector[0], translationVector[1], translationVector[2]);
42 environmentMesh->translate(scaledTranslationVector);
44 return environmentMesh;
std::shared_ptr< Geometry::MeshObject > rotate(std::shared_ptr< Geometry::MeshObject > environmentMesh, double xRotation, double yRotation, double zRotation)
Rotates the environment by a generated matrix.
static Kernel::Matrix< double > generateMatrix(double xRotation, double yRotation, double zRotation)
Generates a rotate Matrix applying the x rotate then y rotate, then z rotate.