Advertisement
Guest User

Bepu + Mono Exception

a guest
Apr 13th, 2012
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. #exception when running under Mono
  2. {System.MethodAccessException: Transparent method System.Collections.Generic.EqualityComparer‘ 1<BEPUphysics.ColIisionTests.Manifolds.TriangleMeshConvexContactManifold/Edge>:.cctor ()
  3. cannot invoke private/internal method System.Collections.Generic.GenericEqualityComparer‘ 1<BEPUphysics.CollisionTests.Manifolds.TriangleMeshConvexContactManifold/Edge>:.ctor ().
  4. at (wrapper managed-to-native) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&)
  5. at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 }
  6.  
  7.  
  8. # line that seems to be causing the exception
  9. HashSet<Edge> blockedEdgeRegions = new HashSet<Edge>();
  10.  
  11.  
  12. #the Edge struct
  13. struct Edge : IEquatable<Edge>
  14. {
  15. private int A;
  16. private int B;
  17.  
  18. public Edge(int a, int b)
  19. {
  20. A = a;
  21. B = b;
  22. }
  23.  
  24. public override int GetHashCode()
  25. {
  26. return A + B;
  27.  
  28. }
  29.  
  30. public bool Equals(Edge edge)
  31. {
  32.  
  33. return (edge.A == A && edge.B == B) || (edge.A == B && edge.B == A);
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement