dimforge / dimforge/nalgebra

Is there a way to convert an `Isometry2` to an `Isometry3` ?

Open
#1,068 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

I have a use case where I need to do that with the 3d components zeroed. Is there a way to do it (other than by hand ?)

Edit:

By hand, I am guessing this is what I want, but I am not sure

```rust
let isometry3 = na::Isometry3::new(
na::Vector3::new(isometry2.translation.x, isometry2.translation.y, 0f32),
na::Vector3::z() * isometry2.rotation.angle(),
)
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.