Page 1 of 1
					
				btStridingMeshInterface TriStrip & TriList
				Posted: Wed Aug 27, 2008 2:52 am
				by baltic
				btStridingMeshInterface::InternalProcessAllTriangles supports only TriStrips for now, but i've got TriList. i've made a quick hack for myself, but would it be better to include ability to handle TriList, TriStrip, and, maybe, TriFan to that interface? I could do that, if you don't have time.
			 
			
					
				Re: btStridingMeshInterface TriStrip & TriList
				Posted: Wed Aug 27, 2008 6:36 am
				by jezek2
				baltic wrote:btStridingMeshInterface::InternalProcessAllTriangles supports only TriStrips for now, but i've got TriList. i've made a quick hack for myself, but would it be better to include ability to handle TriList, TriStrip, and, maybe, TriFan to that interface? I could do that, if you don't have time.
It uses indicies to access vertices, so you can use any topology you want.
 
			
					
				Re: btStridingMeshInterface TriStrip & TriList
				Posted: Wed Aug 27, 2008 3:37 pm
				by baltic
				It assumes that indicies are in TriStrip topology. My index buffer is TriList.
			 
			
					
				Re: btStridingMeshInterface TriStrip & TriList
				Posted: Wed Aug 27, 2008 6:03 pm
				by reltham
				It actually assumes TriList. Three indices per triangle.
			 
			
					
				Re: btStridingMeshInterface TriStrip & TriList
				Posted: Wed Aug 27, 2008 6:16 pm
				by Erwin Coumans
				The btStridingMeshInterface supports both triangle arrays and triangle strips, you just have to adjust the index striding.
If you want to use index arrays, you can use an index array like this: ABC-BCD-CDE-DEF with index striding 3*sizeof(integer), giving you 4 triangles ABC,BCD,CDE,DEF.
If you want to use index strips, you can use an index array ABCDEF, and use index striding 1*sizeof(integer), giving you the same 4 triangles.
Hope this helps,
Erwin