Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6654549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:24:11+00:00 2026-05-26T01:24:11+00:00

i am asked to change the mesh data structure in the apiMeshShape plug-in of

  • 0

i am asked to change the mesh data structure in the apiMeshShape plug-in of Maya. So now I wanna draw a 3D mesh represented in Vertex-vertex structure (as you can see in en.wikipedia.org/wiki/Polygon_mesh) using opengl.

1)First, i don’t know exactly how to represent the Vertex-vertex mesh. I wonder if the data structure as follow is ok?

MPointArray vertices;    //the position of all the vertices
MIntArray vertices_connects_counts;    //how many other vertices each vertex connect with
MIntArray vertices_connects;    //the index array storing each the vertices' index connected with all the vertices

take the cube example in the http://en.wikipedia.org/wiki/Polygon_mesh as the example.

vertices_connects_counts = {5,5,5,5,5,5,5,5,4,4};
vertices_connects = {1,5,4,3,9,
                    2,6,5,0,9,
                    3,7,6,1,9,
                    2,6,7,4,9,
                    5,0,3,7,8,
                    6,1,0,4,8,
                    7,2,1,5,8,
                    4,3,2,6,8,
                    5,6,7,8,                                       
                    0,1,2,3 };

2)Secondly, if the data structure above is right i wonder how to draw the mesh using openGL? Which parameter should i pass into glBegin()?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T01:24:12+00:00Added an answer on May 26, 2026 at 1:24 am

    1) That’s a functional data structure for your needs as described.

    2) Allow me to quote the Wikipedia article that you linked:

    but not widely used since the face and edge information is implicit. Thus, it is necessary to traverse the data in order to generate a list of faces for rendering.

    That’s what you have to do. If you insist on keeping this data structure (and I wouldn’t), then you’re going to have to walk the connectivity graph and build a list of vertex faces. Then you’ll have the data to send to OpenGL.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm guessing this has been asked already. I know in php you can change
I asked How can I tell if a point belongs to a certain line?
I asked a question earlier about why left joins in Linq can't use defined
A co-worker asked me to change a signature from using a primitive boolean to
I've recently asked my server administrator, for my Windows dedicated server, to change the
So I have been asked to change the engine of a few tables in
recently I've asked a question on how to change a span's text via javascript
I have asked several questions about Zend and its search functions. Now after further
I am constantly asked to change the filters on my companies SQL Server Transactional
My client asked me (a JavaScript client-side programmer) to change the order of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.