I am writing a custom physics engine for a game that I am making, my physics object class has tons of variables (distance, velocity, acceleration, mass, gravity, force, impulse duration etc....). Will creating a setter and getter function for each of these variables impact performance? (There will be at least 100 instances of this class at a given time)
Also should I create setters and getters? I heard public variables are really bad practice but there are a lot of variables, can this be an exception?