Advertisement Jump to content
Sign in to follow this  
hawk1234

3ds MAX SDK accessing polygons of the object

This topic is 2635 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

[color=#222222][font=arial, sans-serif][size=2]I have a problem with accessing polygons of the object I'm modyfing. I only managed to access faces of the object. Also I would like to delete accessed faces or polygons (if it is possible).[/font][color=#222222][font=arial, sans-serif][size=2]
[/font][color=#222222][font=arial, sans-serif][size=2]here is a piece of code I'm writing[/font][color=#222222][font=arial, sans-serif][size=2]
[/font][color=#222222][font=arial, sans-serif][size=2]

void AlgoritmModel::modifyObject(int proc_of_faces){[/font]
prepereForModifications();

int f = caluculateNrOfFacesToHide(proc_of_faces);
int* indexTab = NULL;

switch(mod){

case AlgoritmModel::RANDOM:
srand((unsigned) 1); //TODO:: initialize with a seed
indexTab = getRandomFaces(f, obj->GetMesh().getNumFaces());
for(int i = 0; i<f; ++i){
obj->GetMesh().faces[indexTab].Hide();
}
delete[] indexTab;
break;
case AlgoritmModel::FIXED:
while(f > 0){
obj->GetMesh().faces[f-1].Hide();
--f;
}
break;
default:
break;
}
}[color=#222222][font=arial, sans-serif][size=2]
[/font][color=#222222][font=arial, sans-serif][size=2]What this function does is hiding procent of faces of the modified object. I need this fuction to delete procent of polygons of the modified object. Thank you for any help.[/font]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!