JeDi
23-03-2006 10:45:25
Hi,
I was browsing your cvs code to find some hints on how to create a collision shape from StaticGeometry, when I stumbled upon a section in your meshShape::generateTriangleMesh function. There's a section in comments about smooth normals and crashing badly, which is quite normal looking at the commented code:
The problem is in the last lines of code. you should swap the mMeshVertices and mMeshVertices_Smoothed, because it's 0 there (at least, it seems to me like that
).
So anyway, does it make a lot of difference using smoothed normals? In what situations are (were) you using it?
And another question: If you could give me any directions on how to create a collision shape from StaticGeometry, that would be great!
Greetz,
JeDi
I was browsing your cvs code to find some hints on how to create a collision shape from StaticGeometry, when I stumbled upon a section in your meshShape::generateTriangleMesh function. There's a section in comments about smooth normals and crashing badly, which is quite normal looking at the commented code:
NxVec3* mMeshVertices_Smoothed;
if (smooth) {
mMeshVertices_Smoothed = new NxVec3[mVertexCount];
NxBuildSmoothNormals(mIndexCount, mVertexCount, mMeshVertices, mMeshFaces, NULL, mMeshVertices_Smoothed, true);
}
//...
if (smooth)
mTriangleMeshDescription.points = mMeshVertices;
else
mTriangleMeshDescription.points = mMeshVertices_Smoothed;
The problem is in the last lines of code. you should swap the mMeshVertices and mMeshVertices_Smoothed, because it's 0 there (at least, it seems to me like that

So anyway, does it make a lot of difference using smoothed normals? In what situations are (were) you using it?
And another question: If you could give me any directions on how to create a collision shape from StaticGeometry, that would be great!
Greetz,
JeDi