StaticMesh drawing with BepuPhysicsDrawer
StaticMesh drawing with BepuPhysicsDrawer
Just had a thought - I use the BepuPhysicsDrawer a fair bit for debugging physics collision volumes, and noticed StaticMesh / triangle mesh stuff isn't in the drawer's lexicon - would be cool to have that, to not have to set up separate drawing for those. Maybe I'll take a stab at coding that up if I get some time...
			
			
									
						
										
						Re: StaticMesh drawing with BepuPhysicsDrawer
It actually does support meshes, but StaticMesh in particular has a weird approach.  The ModelDrawer can use the TriangleMesh type to draw.  So instead of doing ModelDrawer.Add(staticMesh), you can do ModelDrawer.Add(staticMesh.Mesh).  Other classes like the InstancedMesh/MobileMesh have explicit cases.
I've occasionally thought about adding the direct StaticMesh case, but never got around to it- it is really simple, so I guess I'll toss it in while I still remember
			
			
									
						
										
						I've occasionally thought about adding the direct StaticMesh case, but never got around to it- it is really simple, so I guess I'll toss it in while I still remember

Re: StaticMesh drawing with BepuPhysicsDrawer
The development version now has a case for the StaticMesh: http://bepuphysics.codeplex.com/SourceC ... evelopment
			
			
									
						
										
						Re: StaticMesh drawing with BepuPhysicsDrawer
Aha - thanks Norbo, adding the .Mesh property did the trick. I figured some form of that drawing logic was already in there, as ConvexHull's always rendered fine.