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.

PureGDK / Vector from dbPro to PureGdk ?

Author
Message
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 2nd Mar 2012 14:06
How do translate these instructions in PureGdk ?


Return Float=X VECTOR3(Vector)

SET VECTOR3 VectorResult, X, Y, Z

r=MAKE VECTOR3(n)
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 2nd Mar 2012 23:41
No one?
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 3rd Mar 2012 08:36 Edited at: 4th Mar 2012 17:17
I NOT found in Manual .
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 4th Mar 2012 16:43
Please , Mistrel , can you reply ?
Olby
14
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 4th Mar 2012 22:03
There is no need for these functions any more as vector3 is simply a 3 float structured variable. So in PureBasic you would code it like this:

+ Code Snippet

Vector3 is a built in structure that contains three floating point variables. I guess it works similarly in C++ as well.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
WLGfx
10
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 4th Mar 2012 22:18 Edited at: 4th Mar 2012 22:19
BOOST has a good vector library which should more than suit your needs and there's also many other vector math libraries for free too. As well as Eigen which seems very simple to use.

Boost comes with a lot of other libraries that you may find useful as you go along.

I was looking for a download link to another library just for the vector math for another one, SVL, but couldn't find it.

EDIT: Whoops, I guess you're using Pure Basic instead of C++... Doh

Mental arithmetic? Me? (That's for computers) I can't subtract a fart from a plate of beans!
Warning! May contain Nuts!
Olby
14
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 5th Mar 2012 00:18 Edited at: 5th Mar 2012 00:19
All of the regular vector math commands are still present in PureGDK, they just ditched all make and set ones as they're not needed any more.



ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0

Attachments

Login to view attachments
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 5th Mar 2012 00:25
yes "All of the regular vector math commands are still present in PureGDK"

but this command ?

Return Float=X VECTOR3(Vector)

SET VECTOR3 VectorResult, X, Y, Z

r=MAKE VECTOR3(n)
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 5th Mar 2012 00:27
How do I translate this code ? - (taken from TGM Forum)

See attached .

Attachments

Login to view attachments
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 5th Mar 2012 16:42
No One ? !
Olby
14
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 5th Mar 2012 18:18
Which programming language are you using? If it's PureBasic then I've already given you an example here.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 5th Mar 2012 18:31
I work with purebasic/puregdk .

which example?
Olby
14
Years of Service
User Offline
Joined: 21st Aug 2003
Location:
Posted: 5th Mar 2012 18:42
The one I posted at the very beginning of this thread:

position.Vector3

position\x=10.0
position\y=0.0
position\z=-10.0

Debug position\x
Debug position\y
Debug position\z

Please pay attention to details, this is how you create a vector3 in PB using PGDK and how you set the values.

ACER Aspire 5920G: Core2Duo 2.2GHZ, 2GB, GeForce 8600M GT 1280MB, Windows Vista Ultimate SP1, PureBasic 4.60 + PureGDK 2.0
Guido Italy
11
Years of Service
User Offline
Joined: 25th Dec 2005
Location:
Posted: 5th Mar 2012 20:35
Thank !

Now i understand !

Login to post a reply

Server time is: 2017-11-22 10:46:09
Your offset time is: 2017-11-22 10:46:09