Skip to content
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

[Math] Vector3 RotateAround #1122

Merged
merged 5 commits into from
Aug 26, 2021

Conversation

AmbulantRex
Copy link
Contributor

PR Details

Adds a convenience method for performing rotation around a target for a given axis and angle of rotation. Includes a rotation shorthand on the Vector3 to match up with @Eideren's Quaternion shorthand in PR #1121.

Related Issue

#1097

Motivation and Context

Rotation around objects is a common task and it would be nice to have a single method to handle it.

The rotation shorthand is common in many game engines either as Quaternion * Vector3 or Vector3 * Quaternion. PR #1121 addresses the Quaternion side shorthand.

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link
Collaborator

@Eideren Eideren left a comment

Choose a reason for hiding this comment

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

Nice !
If you could get rid of the unnecessary white-space changes while you're at it that would be great :)

sources/core/Stride.Core.Mathematics/Vector3.cs Outdated Show resolved Hide resolved
sources/core/Stride.Core.Mathematics/Vector3.cs Outdated Show resolved Hide resolved
@Eideren
Copy link
Collaborator

Eideren commented Aug 23, 2021

Thanks ! I'll merge this one as soon as #1121 is merged in

@AmbulantRex AmbulantRex changed the title [Math] Vector RotateAround & Vector3 * Quaternion rotation shorthand [Math] Vector3 RotateAround Aug 24, 2021
@Eideren Eideren merged commit 29d860c into stride3d:master Aug 26, 2021
@AmbulantRex AmbulantRex deleted the AmbulantRex/vec3-rotatearound branch August 27, 2021 01:43
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.

2 participants