Add a general node searching function for any geometric types

as titled
okay... if i remember it correctly, i'm using dynamic_cast here because I got compiling errors with static_cast before. maybe the errors were due to other mistakes. i'll try it again