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
0 registered members (), 16,302 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
vertex creation - create new entity out of vertex #307357
01/28/10 18:30
01/28/10 18:30
Joined: Jan 2010
Posts: 44
Galati, Romania
CItrok Offline OP
Newbie
CItrok  Offline OP
Newbie

Joined: Jan 2010
Posts: 44
Galati, Romania
I want to create an entity of array of vertexes during game.

For instance I want to create an entity - triangular pyramid ( see http://www.mathsisfun.com/geometry/images/triangular-pyramid.png ) out of 4 points coordinates . How do I implement this?

Re: vertex creation - create new entity out of vertex [Re: CItrok] #309552
02/09/10 23:20
02/09/10 23:20
Joined: Jan 2010
Posts: 44
Galati, Romania
CItrok Offline OP
Newbie
CItrok  Offline OP
Newbie

Joined: Jan 2010
Posts: 44
Galati, Romania
the sollution so far I found is to use a generic model ( let's say a cube with as many vertexes we may need to compose the new model) and than using functions
ent_getvertex, ent_setvertex to modify each vertex coordinates.

bellow only y variable is modified.

///////////////////////////////
int i = ent_status(terrain,0); // number of vertices
for (; i>0; i--) {

CONTACT* c = ent_getvertex(terrain,NULL,i);
c.y += 50.0;
ent_setvertex(terrain,c,i);
}

Re: vertex creation - create new entity out of vertex [Re: CItrok] #309560
02/09/10 23:54
02/09/10 23:54
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Can't you use a D3DVERTEX struct somehow?


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