New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convienience constructors for 3D rotations #777

Merged
merged 5 commits into from May 6, 2017

Conversation

Projects
None yet
2 participants
@jabooth
Member

jabooth commented Jan 8, 2017

Expands the convenience constructors we already have for 2D Rotations to 3D, specifically for rotations around the X, Y, and Z axes.

TODO: add tests.

@classmethod
def init_from_3d_ccw_angle_around_z(cls, theta, degrees=True):
r"""
Convenience constructor for 3D CCW rotations around the z axis

This comment has been minimized.

@patricksnape

patricksnape Jan 9, 2017

Contributor

Can we maybe just state for these what the handedness convention is, which way is up etc? So people can know how to orient their meshes?

This comment has been minimized.

@jabooth

jabooth Jan 10, 2017

Member

Not sure what you mean? ccw infers Counter ClockWise, so to me it seems fully specified. I guess we could state that XYZ is a RH coordinate system but it feels that this assumption is made in far more places than just this in menpo...

P.S. think it's a little dangerous to state what 'up' is - I guess it doesn't really have a meaning here. If I have a facial mesh where +z is up, then to spin the head around I would use to init_from_3d_ccw_angle_around_z method. If the mesh is orientated with +y as up, I'd use the init_from_3d_ccw_angle_around_y to spin that one in a CCW fashion...unless I'm missing your meaning here?

"""
if degrees:
# convert to radians
theta = theta * np.pi / 180.0

This comment has been minimized.

This comment has been minimized.

@jabooth

jabooth Jan 10, 2017

Member

Fair cop!

@patricksnape

This comment has been minimized.

Contributor

patricksnape commented Feb 6, 2017

Jenkins retest this please

@jabooth

This comment has been minimized.

Member

jabooth commented Feb 7, 2017

@patricksnape all passed - any objections or can we bring it in?

@patricksnape

This comment has been minimized.

Contributor

patricksnape commented Feb 8, 2017

Just tests my main man

@jabooth jabooth merged commit 4ed81f7 into menpo:master May 6, 2017

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@patricksnape patricksnape deleted the jabooth:3drots branch May 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment