문제

I want to render a mesh made up of tetrahedron in OpenGL because I am trying to implement animation which requires the use of the 'finite element method'. As a novice of OpenGL, I am not quite sure how to approach this.

So far, I have come across NETGEN which is supposed to generate a tetrahedral mesh from an object. From the example I downloaded, it takes a .geo file for input and outputs a .vol file.

The .vol file has a lot of data points and variables listed inside. Is this a standard file to read in? Or is it proprietary depending on which software generates it? In other words, are there standard methods for rendering this kind of file or do I need to manually parse the data from the file and then somehow render it as GL_LINES, etc?

도움이 되었습니까?

해결책

it takes a .geo file for input and outputs a .vol file

The name suffixes are absolutely nontelling.

Anyway, OpenGL deals with providing drawing tools only. There's no functionality to read in files, be it geometry or images. And thus there is no "standard OpenGL file format".

Indeed it's your deed to read in those files, either with a parser you write, or some third party library, and pass the data to OpenGL, then issuing the right commands to make OpenGL draw a picture from the data.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top