About Store Forum Documentation Contact



Post Reply 
MeshBase.quad.nrm() bug?
Author Message
mystara Offline
Member

Post: #1
MeshBase.quad.nrm() bug?
Hi,

I'm trying to create a quad which has the same normal to a quad in an object.

However, although MeshBase.quad.elms() confirms that there is 1 quad, MeshBase.quad.nrm(0) returns an access error.

When I print the memory address of MeshBase.quad.nrm(), it gives me 0x0000000...

This is despite having previously used setNormals()

Bug? Or silliness on my part?

Alternatively, or perhaps as well, is there any way I can copy the normal by using the quad vertices? I think a quad could have two possible normals, so how does Esenthel select which one? Does it have to do with the ordering of the vertices?
10-05-2011 04:57 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: MeshBase.quad.nrm() bug?
you want to use vertex normals (they are generated on setNormals)
VecI4 v=base.quad.ind(0);
base.vtx.nrm(v.x);
base.vtx.nrm(v.y);
base.vtx.nrm(v.z);
base.vtx.nrm(v.w);
10-05-2011 07:20 PM
Find all posts by this user Quote this message in a reply
mystara Offline
Member

Post: #3
RE: MeshBase.quad.nrm() bug?
Ah, cool, thanks!
10-05-2011 09:32 PM
Find all posts by this user Quote this message in a reply
Post Reply