copy constructor from a ray pointer