Rigifoam is made of polyurethane, which is a lung irritant if inhaled. Your lungs do naturally cleanse and heal themselves, however, if the damage is bad enough you could have scarring.
Call your doctor, or your local poison control center. If this happened on the job, you can call NIOSH (National Institute for Occupational Safety and Health) or go online http://www.cdc.gov/niosh/
Your state should have worker safety resources available online as well.