A general method for the detection and estimation of additive, dominance and epistatic variation for metrical traits