Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upImplement advanced local movement #447
Conversation
| @@ -65,8 +65,8 @@ impl Scene { | ||
| /// Returns the active camera in the scene. | ||
| /// | ||
| /// TODO: Render to multiple viewports with possibly different cameras. | ||
| - pub fn active_camera(&self) -> Option<&Camera> { | ||
| - self.cameras.first() | ||
| + pub fn active_camera(&mut self) -> Option<&mut Camera> { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
minecrawler
Oct 24, 2017
Contributor
I guess it's not. It was, when I put all the movement on Camera in the beginning. Should I remove it?
minecrawler
Oct 24, 2017
Contributor
I guess it's not. It was, when I put all the movement on Camera in the beginning. Should I remove it?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
I created an issue for the dead code |
| } | ||
| impl LocalTransform { | ||
| + /// Rotate to look at a point in space (without rolling) | ||
| + pub fn look_at(&mut self, orientation: &Orientation, position: Vector3<f32>) -> &mut Self { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
minecrawler
Oct 24, 2017
Contributor
We already expose cgmath in other places as well (see the camera object as an example). However, I also think that mint would be a better idea. I've been thinking about streamlining the API with traits and Mint and expanding the functionality to global transformation. The question for me would be: Should I put in Mint types here, or do so in the other PR with the traits (if they are acceptable)?
minecrawler
Oct 24, 2017
Contributor
We already expose cgmath in other places as well (see the camera object as an example). However, I also think that mint would be a better idea. I've been thinking about streamlining the API with traits and Mint and expanding the functionality to global transformation. The question for me would be: Should I put in Mint types here, or do so in the other PR with the traits (if they are acceptable)?
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
| + } | ||
| + | ||
| + /// Set the position. | ||
| + pub fn set_position(&mut self, position: Point3<f32>) -> &mut Self { |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
torkleyy
Oct 24, 2017
Member
E.g. here I have the feeling that exposing the cgmath type just makes it more verbose.
torkleyy
Oct 24, 2017
Member
E.g. here I have the feeling that exposing the cgmath type just makes it more verbose.
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Rhuagh
Oct 24, 2017
Member
I opened an issue for removing cgmath from the public facing APIs (#452). Can we approve this then?
|
I opened an issue for removing cgmath from the public facing APIs (#452). Can we approve this then? |
Aceeri
added
project: core
type: improvement
labels
Oct 24, 2017
bot
added a commit
that referenced
this pull request
Oct 25, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Build failed |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Failed internally in appveyor on rustc download. bors r+ |
minecrawler commentedOct 24, 2017
Cleaned #342 , implements movement helpers on
LocalTransform