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 (), 18,654 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
How change vertex normal? #267854
05/26/09 14:20
05/26/09 14:20
Joined: Jun 2008
Posts: 151
Ukraine
XD1v0 Offline OP
Member
XD1v0  Offline OP
Member

Joined: Jun 2008
Posts: 151
Ukraine
I try inverse all normals in the mesh, but ent_getvertex /ent_setvertex do not work or i do something wrong?
Code:
 
 function invert_all_normals (ENTITY* ent)
{
	CONTACT* c;
	VECTOR inv;
	int i;
	i = ent_status (ent,1);
	for (;i>0;i--) {
		c = ent_getvertex (ent,NULL,i);
		vec_set(inv,vector(c.nx,c.ny,c.nz));vec_inverse(inv);
		c.nx = inv.x;c.ny = inv.y;c.nz = inv.z;
		//c.v.nx = inv.x;c.v.ny = inv.y;c.v.nz = inv.z;
		ent_setvertex(ent,c,i);
	}
}


Last edited by XD1v0; 05/26/09 14:22.

A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram
Re: How change vertex normal? [Re: XD1v0] #268341
05/28/09 17:57
05/28/09 17:57
Joined: Jun 2008
Posts: 151
Ukraine
XD1v0 Offline OP
Member
XD1v0  Offline OP
Member

Joined: Jun 2008
Posts: 151
Ukraine
Looks like i try do impossible thing, I think that if i change normal of vertex i can change face orientation, now i see that is stupid, anyway i solved this using ent_getmesh/ent_setmesh.


A7 Commercial cool
Celeron 1700, GeForce 5500 FX 256mb, 1 Gb Ram

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

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