Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,014 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 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 | 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