Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 24 Jul 2013
Offline Last Active Aug 02 2013 10:58 AM

Topics I've Started

mixing unicode and non-unicode

02 August 2013 - 10:57 AM

Hi everyone,

I'm trying to figure out if I can use both strings in the same project. I just need to use common function with different strings, like the following:


char* a = "raw string"

wchar*  = L"unicode string"


and use the same function like


strinLength(a), stringLength(b)


I'm looking for some template functions which can handle both strings, maybe something inside the std ? I'm not sure if find, replace etc.. provided in <algorithm> can handle this problem, any idea? Because I also need to use a lot of string util functions, not just the length.




sphere position during collision

24 July 2013 - 06:49 AM

Hi everyone,

I have a small problem I hope you can help me :)

I have a sphere and some walls, I need to place the sphere as close as possible (so like the collision happen) to the geometry. we can think it as 2D problem:




Suppose my sphere is the top one (with center in Ja), I need to find that Ja vector. I have the sphere (radius, direction etc..), the geometry (can be a triangle, separate lines, no problem..). I already managed the case of hitting a line, but when I change the direction across a vertex, I get incorrect result. I mean, my problem is to get the right sphere position when I have 2 lines (concave or convex).