Advertisement Jump to content
Sign in to follow this  

Triangle Stripe (Texture, Normal)

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

Hello. I am confused over figuring out how I should assign the normals to vertices in my program (cloth). I am using triangle stripe to represent my mesh, I have a loop that draw all my stripes like this:
struct Stripes {

int number_of_nodes;
  struct Node {
     int no;

} Tri_Stripes [50];

	    for(int x=1;x<=number_of_stripes;x++){
      for (int y = 0; y <= Tri_Stripes[x].number_of_nodes ; y++){
vec3 no = box_array[Box_N]->particles1[Tri_Stripes[x].nodes[y].no]->velo;
glNormal3f(no.getX (),no.getY (),no.getZ ());  
        glVertex3f(box_array[Box_N]->particles1[Tri_Stripes[x].nodes[y].no]->pos.getX (),		   box_array[Box_N]->particles1[Tri_Stripes[x].nodes[y].no]->pos.getY (),	           box_array[Box_N]->particles1[Tri_Stripes[x].nodes[y].no]->pos.getZ());                               
			}//end for

    }//end for loop

the program draw the mesh but to calculate my normal I take each vertices's velocity (direction) and then normalise it and assign it to my glNormal3f as above. The result isnt what I want and as I can see normals are not working. Once I solve this problem I will ask my problem about textures. Thanks in advance [Edited by - bargasteh on September 14, 2005 8:49:26 PM]

Share this post

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

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!