btMaterial::btMaterial(btScalar youngModulus, btScalar poissonRatio): m_e(youngModulus), m_nu(poissonRatio), m_E(6, 6) { computeE(); }
int main() { int n; float epsilon; printf("Enter a value for n: "); scanf("%d", &n); printf("Enter a value for E (epsilon): "); scanf("%f", &epsilon); printf("\n"); printf("e = %f\n", computeE(n, epsilon)); return 0; }
void btMaterial::setPoissonRatio(btScalar nu) { m_nu = nu; computeE(); }
void btMaterial::setYoungModulusAndPoissonRatio(btScalar youngModulus, btScalar poissonRatio) { m_e = youngModulus; m_nu = poissonRatio; computeE(); }
void btMaterial::setYoungModulus(btScalar e) { m_e = e; computeE(); }