Jump to content
  • Advertisement
Sign in to follow this  
Butabee

Destructable Structure

This topic is 2721 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

I'm working on making a point based engine... everything is made of points.

I'm having trouble coming up with a way to structure them where every point can be easily separated.

For instance if I have a plane of points and it get's chopped in half in any direction slice, I need to create two separate objects,

Anyone have some ideas on what would be the best way to do this?

Share this post


Link to post
Share on other sites
Advertisement
How are the points connected to one another? Are they in an array that map the points to the plane? If so create two arrays for the two new objects then just iterate the array and perform a dot test to find which side the point is on of the cutting plane and insert into either one of the two arrays. Though that assumes your cutting plane is infinite.

Another data structure would be to define a graph where the points are connected into a mesh that define the connectivity. Then when you cut into the point cloud you remove edges in the graph and perform a flood fill on any point in the set to find if you have to two disjoint sets which would mean that cut separated the object into two objects.

What exactly is the point of a point based engine?

Share this post


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

  • Advertisement
×

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!