Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, RealSerious3D, chsmac85), 980 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Arrays, pointers, vectors, oh my! [Re: Widi] #305222
01/13/10 16:47
01/13/10 16:47
Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
İstanbul, Turkey
Originally Posted By: Widi

The Engine supports only 64 VECTOR Pointer


wrong. there is no limit on that. thing about 64 is this:

vector funtion returns a temporary VECTOR* right? if you call them more than 64 times it starts returning same vector* s again, so you should only use it for calculations and not vector* init.


3333333333
Re: Arrays, pointers, vectors, oh my! [Re: Quad] #305223
01/13/10 16:54
01/13/10 16:54
Joined: Sep 2008
Posts: 68
T
Tai Offline OP
Junior Member
Tai  Offline OP
Junior Member
T

Joined: Sep 2008
Posts: 68
Could I retrieve vector positions from the entity array?

Re: Arrays, pointers, vectors, oh my! [Re: Tai] #305227
01/13/10 17:42
01/13/10 17:42
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Sure, with vec_set you can copy one vector to another.

Re: Arrays, pointers, vectors, oh my! [Re: Tobias] #305344
01/14/10 10:20
01/14/10 10:20
Joined: Aug 2007
Posts: 1,922
Schweiz
Widi Offline
Serious User
Widi  Offline
Serious User

Joined: Aug 2007
Posts: 1,922
Schweiz
@Quadraxas: Maybee i am understand something wrong with the limit of 64 VECTOR Pointers.
In the Manual (--> Vector calciulation, --> vector) they say:

The vector pointers have a limited lifetime because there are only 64 different vectors available for this function, that are used cyclic.So use this only for passing temporary vectors to functions, but not for permanent vector pointers.

Can you explain me this thing? Thanks.

Re: Arrays, pointers, vectors, oh my! [Re: Widi] #305361
01/14/10 12:09
01/14/10 12:09
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
G'day,

The thing with the vectors is when you use something like, "vec_set(my.x, vector(1, 2, 3));" -- that vector function can only return a pointer to one of 64 internal vectors.

This'll rarely be an issue, unless you pass a pointer to a temporary vector to a function, and that function has 64 or more "vector(...)" calls in it before it is finished with the information in the temporary vector you passed to it.

I hope that makes sense laugh

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Page 2 of 2 1 2

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1