Search Home Members Contacts
About Us
Products
Downloads
Community
Support
Pages: [1]
  Print  
Author Topic: Volumetric calculations and topology  (Read 1327 times)
wildsurfer
Community Member
*
Posts: 82


« on: May 12, 2010, 02:40:05 AM »

Hi,

I have a few questions:

1) How can we calculate the volume and/or surface area of a mesh during runtime?


2) How can we enforce the topological rule on the mesh? (e.g. if a wall is partially destroy, the "leftover" wall still should be a solid mesh instead of disjointed polygons)


Thanx!
Logged

wildsurfer
Mithrandir
Community Member
*
Posts: 325


« Reply #1 on: May 12, 2010, 06:55:12 AM »

There are no such functions in TV3D but you can do it manually.
You can iterate through all polygons and use GetTriangleInfo to get vertices and GetVertex to get their positions.

1) Having positions of vertices of each polygin makes it straight forward to calculate surface area and volume. I'm sure you can find some algorithms on that.

2)This can be a tricky thing to do but again there must be some articles about how to do this somewhere online. You can then add new faces and vertices using AddVertex and AddFace to close up the mesh.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks