Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Is it possible to set/get each element of a Matrix4

Author
Message
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 19th Oct 2003 17:17
Is there anyway I can access to each element of a Matrx4, and set/get its value? Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 19th Oct 2003 19:01 Edited at: 19th Oct 2003 19:02
No, but the vector commands do map to either the first line or the first column of the matrix (not sure which, I've not tested it) or maybe even some other combo



That's the nearest that I can get ATM I'm afraid
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 21st Oct 2003 06:13
Hmm... true. But that only works on the first row of the matrix. What about the other elements? Any "tricks" access and modify it directly?

Thanks!

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Oct 2003 11:48
There may be a trick that I can play to read values, but not to set them, but you can't do it from DBPro - It will need a plugin
Bulleyes
23
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 21st Oct 2003 13:01
How? Mind sharing the trick? I know that basically all the matrix4 math in DBpro is equivalent to DirectX DX3DMatrix functions.

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Dmitry K
23
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Russia
Posted: 22nd Oct 2003 20:53 Edited at: 22nd Oct 2003 20:54
You can only read matrix elements. See code.

IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Oct 2003 21:35
Oh, looks like you *can* do it from DBPro ... just not as fast

There is a function within the vector dll that returns the matrix you specify - I would just have a command that would call this to get the matrix and either accept one or two arguments to get the value at the matrix position.

I might get around to implementing it one day ... or I might not. It depends on if I ever find a use for it.

Login to post a reply

Server time is: 2026-07-26 05:22:36
Your offset time is: 2026-07-26 05:22:36