Search found 3526 matches

by Acki
Sun Dec 26, 2021 3:10 am
Forum: Everything 2d/3d Graphics
Topic: Using a Matrix to transform vectors
Replies: 1
Views: 2566

Using a Matrix to transform vectors

hi,
I have 8 vectors that build a bounding box...
and I have the transformation matrix of a node...

but how do I use the matrix to translate and rotate the vectors ???

sorry for my ignorance... :oops:
by Acki
Wed Dec 08, 2021 12:23 pm
Forum: Game Programming
Topic: Get Position From Screen-Coordinates Problem
Replies: 6
Views: 3259

Re: Get Position From Screen-Coordinates Problem

just an update...

I had to adapt the function to my code, and vice versa...
and now it works like a charm !!! :)

thanks for the inspiration !!! :)
by Acki
Tue Dec 07, 2021 9:27 pm
Forum: Game Programming
Topic: Get Position From Screen-Coordinates Problem
Replies: 6
Views: 3259

Re: Get Position From Screen-Coordinates Problem

yeah, I hear you... :lol:

then I'll have to check the source of the collision manager...
I guess I can extract just that function instead of creating a complete collision manager... :P

thanks anyway !!! ;)
by Acki
Tue Dec 07, 2021 3:56 pm
Forum: Game Programming
Topic: Get Position From Screen-Coordinates Problem
Replies: 6
Views: 3259

Re: Get Position From Screen-Coordinates Problem

yes, I know, of course... ;)
but I don't use it anywhere else...
and I don't want to create one only for this function... :P
by Acki
Tue Dec 07, 2021 2:49 pm
Forum: Game Programming
Topic: Get Position From Screen-Coordinates Problem
Replies: 6
Views: 3259

Get Position From Screen-Coordinates Problem

Hi, I hope you're all doing well !!! :) I wrote my own function to get a line from screen coordinates straight forward... to create a ray for ray casting (node picking)... it works so far... but the screen coordinates are not calculated, it seems... the node always stays at the center of the screen,...
by Acki
Thu May 06, 2021 3:02 pm
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

I had to reverse my rotation order in the render loop from ZYX to XYZ... but when I change the order in the matrix instead the calculation gives wrong values... no big deal I can live with the render order XYZ... but I have to change a few other things also now... for example... now I get wrong resu...
by Acki
Wed May 05, 2021 5:21 pm
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

ok, I made some test cases on Irrlicht, and then the same with my Java code... and it turned out, the calculations were correct (same results)... :shock: and now I get THIS: https://www.youtube.com/watch?v=VrErHDAswP0 I hope you don't mind having one last look at this video... I won't bother you wit...
by Acki
Tue May 04, 2021 4:57 pm
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

what test cases?

I don't get the same results when I change the order...
but it's always wrong...
by Acki
Tue May 04, 2021 9:26 am
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

I can't get it to work... :cry:

I tried each possible multiplication order (TXYZ, TZYX, XYZT, ZYXT)...
I also tried with/without scale...
I ported all needed functions from the Irrlicht matrix to Java...
no success !!! :(

I have no clue what's wrong...
by Acki
Sun May 02, 2021 12:09 pm
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

of course I also had a look at your Quaternion approach...

but honestly, I don't get how to use it to rotate the axes !!! :oops:

can you give me an example on how to use your Quaternion method to rotate the 3 axes, please !? ;)
by Acki
Sun May 02, 2021 10:39 am
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

yeah, right... the matrix array goes from 0 to 15 for both (DX and OGL)... how they are interpreted internally is irrelevant, 0-3 is either a row or a column, but it's always the same (0-3) in the array !!! :D LH or RH doesn't matter at the moment... if the result rotates the wrong direction I simpl...
by Acki
Sat May 01, 2021 10:42 am
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

ok, I had a look at Irrlicht's matrix4 for this methods... and I guess I'm getting closer !!! this methods use trigonometry, and it seems exactly what I want !!! this are the three methods I need:     inline CMatrix4<T>& CMatrix4<T>::setRotationAxisRadians( const T& angle, const vector3d<T>&...
by Acki
Sat May 01, 2021 9:12 am
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

yeah, I had a look at it... but I can't use it, because OpenGL Matrix doesn't have the methods you're using there... :shock: like rotateVect() and setRotationAxisRadians()... I guessed they may are called differently... so I tried (guessed) what methods it could be for the OGL matrix and came up wit...
by Acki
Fri Apr 30, 2021 4:28 pm
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

I made another video to explain the problem I have with this... https://www.youtube.com/watch?v=RrD-korYraE and I apologize for the terms error and wrong, it's just one way how it's done, but not how I want it to do... :D everything I do, I do with a matrix (4x4)... maybe I don't get how to use it t...
by Acki
Fri Apr 30, 2021 2:09 pm
Forum: Advanced Help
Topic: Matrix Rotation Around Local Axes
Replies: 23
Views: 5052

Re: Matrix Rotation Around Local Axes

yeah, I fully aggree... but we're talking past each other... let me phrase my whole question differently... :lol: I have a vector: vector3df(1, 1, 1) now I rotate that vector 45° around Z, so I ignore X for now (0, 1, 1)... so X and Y will change to represent the new Y axis... I calculate X and Y fo...