Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,633 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
path_edges ? #255056
03/07/09 10:57
03/07/09 10:57
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
hi, there are is a path functions that I'm missing

- a function to return the total number of edges in a path

this would be quite helpful!


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread
Re: path_edges ? [Re: Stromausfall] #255206
03/08/09 19:42
03/08/09 19:42

M
mercuryus
Unregistered
mercuryus
Unregistered
M



combine these two functions and calculate the number of total edges yourself:

Code:
// returns the number of nodes of a an entity assigned path
function path_totalnodecount(ENTITY* p_e){
var lv_cnt = 1;

	while(path_getnode(p_e,lv_cnt,temp,gv_nskill)!=0){lv_cnt+=1;}
	return(lv_cnt-1);
	
}

and
Code:
// get the number of edges of a node
function path_getedgecnt(ENTITY* p_e,var p_node){
var lv_ret;
var lv_ec = 0;	
	
	// get edge count
	while(path_getedge(p_e,p_node,lv_ec+1,temp)!=0){lv_ec+=1;}
	return(lv_ec);
	
}


Re: path_edges ? [Re: ] #256386
03/16/09 14:29
03/16/09 14:29
Joined: Dec 2002
Posts: 616
Austria
Stromausfall Offline OP
User
Stromausfall  Offline OP
User

Joined: Dec 2002
Posts: 616
Austria
Thank you !


get the C# wrapper:
for A7.85.4 and A8.30.4, Version 2.3.9
at http://acknexwrapper2.matthias-auer.net/ or visit the thread

Moderated by  aztec, Spirit 

Gamestudio download | 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