I am trying to get the edge vertices of objects (from a certain view), but it is giving me trouble, can anyone point me in the right direction? (the variable outlineVertices is always 0)
int outlineVertices = 0;
dbLoadObject("box.X",1);
dbMakeMeshFromObject(1,1);
dbAddMeshToVertexData(1);
dbLockVertexDataForMesh(1);
dbMakeVector3(1);
dbSetVector3(1,-100,100,0); // LIGHT POSITION !!!
for(int i = 0; i < dbGetVertexDataVertexCount(); i++) {
dbMakeVector3(2);
dbSetVector3(2, dbGetVertexDataNormalsX(i),dbGetVertexDataNormalsY(i),dbGetVertexDataNormalsZ(i));
if(dbACOS(dbDotProductVector3(1,2)) <= 0) {
outlineVertices++;
}
}
dbUnlockVertexData();
Your signature has been erased by a mod