Skip to content

math-utility#48

Merged
skim0119 merged 1 commit intometa2quest-integrationfrom
04-12-math-utility
Apr 15, 2026
Merged

math-utility#48
skim0119 merged 1 commit intometa2quest-integrationfrom
04-12-math-utility

Conversation

@skim0119
Copy link
Copy Markdown
Collaborator

@skim0119 skim0119 commented Apr 12, 2026

TL;DR

Added 3x3 matrix operations and quaternion-director conversion utilities for VR math calculations.

What changed?

Created two new math utility modules:

matrix3.js - Provides core 3x3 matrix operations:

  • identity3x3() - Creates a 3x3 identity matrix
  • transpose3x3() - Transposes a 3x3 matrix
  • multiply3x3() - Multiplies two 3x3 matrices

quaternions.js - Handles conversions between quaternions and director matrices:

  • quaternionFromRowwiseDirector() - Converts row-wise director matrix to THREE.js quaternion
  • columnwiseDirectorFromQuaternion() - Converts quaternion to column-wise director matrix using manual quaternion-to-rotation-matrix math
  • rowwiseDirectorFromQuaternion() - Converts quaternion to row-wise director matrix for elastica representation

How to test?

Import the functions and verify:

  • Matrix operations produce mathematically correct results
  • Quaternion conversions maintain proper orientation relationships
  • Director matrices are in the expected format for elastica representation
  • Integration with THREE.js quaternions works correctly

Why make this change?

These utilities enable proper coordinate system conversions between VR controller orientations (quaternions) and the elastica physics simulation format (director matrices), which is essential for translating user input into physics-based rod deformations.

Copy link
Copy Markdown
Collaborator Author

skim0119 commented Apr 15, 2026

Merge activity

  • Apr 15, 1:56 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Apr 15, 1:59 AM UTC: Graphite rebased this pull request as part of a merge.
  • Apr 15, 2:00 AM UTC: @skim0119 merged this pull request with Graphite.

@skim0119 skim0119 changed the base branch from style-update to graphite-base/48 April 15, 2026 01:57
@skim0119 skim0119 changed the base branch from graphite-base/48 to meta2quest-integration April 15, 2026 01:58
@skim0119 skim0119 force-pushed the 04-12-math-utility branch from 93e1add to 3b327e3 Compare April 15, 2026 01:59
@skim0119 skim0119 merged commit 5f8d930 into meta2quest-integration Apr 15, 2026
1 check passed
@skim0119 skim0119 deleted the 04-12-math-utility branch April 15, 2026 02:14
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