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

Issue with control surface code #947

Open
joergbrech opened this issue Feb 21, 2023 · 1 comment
Open

Issue with control surface code #947

joergbrech opened this issue Feb 21, 2023 · 1 comment

Comments

@joergbrech
Copy link
Contributor

Hi Martin,

I just reproduced parts of this code for some OpenGL example for students.

I thin this code will not work if the p1 and p2 share the same y coordinate. Is this checked somewhere else?

I guess It is better to check for this case before constructing eyV, so if exV.y == 0 construct a different vector for eyV. For example:

gp_Vec eyV(2, 1 , -(2*exV.x + exV.y)/exV.z);

And then instead of creating the third axis "manually" we can simply calculate the cross product between exV and eyV which should then result in a local coordinate system that is always valid.

We would also have to negate the alpha rotation then, If I am correct...

taken from @Mk-arc's comment here: 4cc8a90#r100084385

@Mk-arc
Copy link
Contributor

Mk-arc commented Feb 21, 2023

See #949 for reference.

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

No branches or pull requests

2 participants