Skip to content

Commit

Permalink
readd
Browse files Browse the repository at this point in the history
  • Loading branch information
dipterix committed Nov 8, 2023
1 parent 1e64ad4 commit 09c2dd5
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/glQuaternion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Quaternion& Quaternion::copy(Quaternion& quaternion) {
}

// [[Rcpp::export]]
void Quaternion__copy(SEXP& self, SEXP& quaternion) {
void Quaternion__copy(SEXP& self, const SEXP& quaternion) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Quaternion> q(quaternion);
ptr->copy(*q);
Expand Down Expand Up @@ -103,7 +103,7 @@ SEXP Quaternion__to_array(SEXP& self) {
}

// [[Rcpp::export]]
double Quaternion__getX(SEXP& self) {
double Quaternion__getX(const SEXP& self) {
Rcpp::XPtr<Quaternion> ptr(self);
return ptr->x;
}
Expand All @@ -113,7 +113,7 @@ void Quaternion__setX(SEXP& self, const double& v) {
ptr->x = v;
}
// [[Rcpp::export]]
double Quaternion__getY(SEXP& self) {
double Quaternion__getY(const SEXP& self) {
Rcpp::XPtr<Quaternion> ptr(self);
return ptr->y;
}
Expand All @@ -123,7 +123,7 @@ void Quaternion__setY(SEXP& self, const double& v) {
ptr->y = v;
}
// [[Rcpp::export]]
double Quaternion__getZ(SEXP& self) {
double Quaternion__getZ(const SEXP& self) {
Rcpp::XPtr<Quaternion> ptr(self);
return ptr->z;
}
Expand All @@ -133,7 +133,7 @@ void Quaternion__setZ(SEXP& self, const double& v) {
ptr->z = v;
}
// [[Rcpp::export]]
double Quaternion__getW(SEXP& self) {
double Quaternion__getW(const SEXP& self) {
Rcpp::XPtr<Quaternion> ptr(self);
return ptr->w;
}
Expand Down Expand Up @@ -234,7 +234,7 @@ Quaternion& Quaternion::setFromAxisAngle(Vector3& axis, const double& angle) {

// [[Rcpp::export]]
void Quaternion__set_from_axis_angle(
SEXP& self, SEXP& axis, const double& angle) {
SEXP& self, const SEXP& axis, const double& angle) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Vector3> ptr_axis(axis);
ptr->setFromAxisAngle(*ptr_axis, angle);
Expand Down Expand Up @@ -298,7 +298,7 @@ Quaternion& Quaternion::setFromRotationMatrix(Matrix4& m) {

// [[Rcpp::export]]
void Quaternion__set_from_rotation_matrix(
SEXP& self, SEXP& m) {
SEXP& self, const SEXP& m) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Matrix4> ptr_m(m);
ptr->setFromRotationMatrix(*ptr_m);
Expand Down Expand Up @@ -368,7 +368,7 @@ Quaternion& Quaternion::setFromUnitVectors(Vector3& vFrom, Vector3& vTo) {

// [[Rcpp::export]]
void Quaternion__set_from_unit_vectors(
SEXP& self, SEXP& v_from, SEXP& v_to) {
SEXP& self, const SEXP& v_from, const SEXP& v_to) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Vector3> ptr_f(v_from);
Rcpp::XPtr<Vector3> ptr_t(v_to);
Expand All @@ -384,7 +384,7 @@ double Quaternion::angleTo(Quaternion& q) {
}

// [[Rcpp::export]]
double Quaternion__angle_to(SEXP& self, SEXP& q) {
double Quaternion__angle_to(SEXP& self, const SEXP& q) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Quaternion> ptr_q(q);
return ptr->angleTo(*ptr_q);
Expand All @@ -405,7 +405,7 @@ Quaternion& Quaternion::rotateTowards(Quaternion& q, const double& step) {
}

// [[Rcpp::export]]
void Quaternion__rotate_towards(SEXP& self, SEXP& q, const double& step) {
void Quaternion__rotate_towards(SEXP& self, const SEXP& q, const double& step) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Quaternion> ptr_q(q);
ptr->rotateTowards(*ptr_q, step);
Expand Down Expand Up @@ -475,7 +475,7 @@ Quaternion& Quaternion::slerp(Quaternion& qb, const double& t) {
}

// [[Rcpp::export]]
void Quaternion__slerp(SEXP& self, SEXP& qb, const double& t) {
void Quaternion__slerp(SEXP& self, const SEXP& qb, const double& t) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Quaternion> ptr_qb(qb);
ptr->slerp(*ptr_qb, t);
Expand Down Expand Up @@ -522,7 +522,7 @@ double Quaternion::dot(Quaternion& v) {
}

// [[Rcpp::export]]
double Quaternion__dot(SEXP& self, SEXP& v) {
double Quaternion__dot(const SEXP& self, const SEXP& v) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Quaternion> ptr_v(v);
return ptr->dot(*ptr_v);
Expand All @@ -534,7 +534,7 @@ double Quaternion::lengthSq() {
}

// [[Rcpp::export]]
double Quaternion__length_squared(SEXP& self) {
double Quaternion__length_squared(const SEXP& self) {
Rcpp::XPtr<Quaternion> ptr(self);
return ptr->lengthSq();
}
Expand All @@ -546,7 +546,7 @@ double Quaternion::length() {
}

// [[Rcpp::export]]
double Quaternion__length(SEXP& self) {
double Quaternion__length(const SEXP& self) {
Rcpp::XPtr<Quaternion> ptr(self);
return ptr->length();
}
Expand Down Expand Up @@ -583,7 +583,7 @@ Quaternion& Quaternion::multiply(Quaternion& q) {
}

// [[Rcpp::export]]
void Quaternion__multiply(SEXP& self, SEXP& q) {
void Quaternion__multiply(SEXP& self, const SEXP& q) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Quaternion> ptr_q(q);
ptr->multiply(*ptr_q);
Expand All @@ -595,7 +595,7 @@ Quaternion& Quaternion::premultiply(Quaternion& q) {
}

// [[Rcpp::export]]
void Quaternion__premultiply(SEXP& self, SEXP& q) {
void Quaternion__premultiply(SEXP& self, const SEXP& q) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Quaternion> ptr_q(q);
ptr->premultiply(*ptr_q);
Expand All @@ -617,7 +617,7 @@ Quaternion& Quaternion::multiplyQuaternions(Quaternion& a, Quaternion& b) {
}

// [[Rcpp::export]]
void Quaternion__multiply_quaternions(SEXP& self, SEXP& a, SEXP& b) {
void Quaternion__multiply_quaternions(SEXP& self, const SEXP& a, const SEXP& b) {
Rcpp::XPtr<Quaternion> ptr(self);
Rcpp::XPtr<Quaternion> ptr_a(a);
Rcpp::XPtr<Quaternion> ptr_b(b);
Expand Down

0 comments on commit 09c2dd5

Please sign in to comment.