Skip to content

Comments

implement rigid transform class#5

Merged
dbacchet merged 1 commit intomasterfrom
davide/transform
Oct 6, 2020
Merged

implement rigid transform class#5
dbacchet merged 1 commit intomasterfrom
davide/transform

Conversation

@dbacchet
Copy link
Owner

@dbacchet dbacchet commented Oct 6, 2020

this PR adds a new object called Transform that represents a rigid transformation that stores position and orientation

/// Quaternion
template <typename T> struct Quaternion {
T w = T(0); ///< real part
typedef T value_type; // to access the inner type at compile time
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default to build the unit quaternion representing no rotation

void operator-=(T rhs);
void operator*=(T rhs);
/// rotate a vector: assumes that the quaternion is normalized (i.e. representing a rotation)
const Vector3<T> rotate(const Vector3<T> &v) const {
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added these to keep the notation consistent with Transform

@dbacchet dbacchet merged commit 45259bd into master Oct 6, 2020
@dbacchet dbacchet deleted the davide/transform branch February 10, 2021 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant