Category:Physics Material Section

From Newton Wiki
Revision as of 07:04, 3 July 2020 by WikiSysop (talk | contribs)
Jump to: navigation, search

Newton material settings are based on real world values and always set in pairs.


NewtonMaterialSetDefaultCollidable - Sets information, weither a material pair can collide. 
NewtonMaterialSetDefaultElasticity - Sets default elasticity
NewtonMaterialSetDefaultFriction - Sets default static and dynamic / kinetic / sliding friction 
NewtonMaterialSetDefaultSoftness - Sets surface softness
NewtonMaterialSetSurfaceThickness - Sets surface's skin thickness 

Friction for materials can be set up using a real world table or calculator such as: https://www.engineeringtoolbox.com/friction-coefficients-d_778.html

Since material is assigned to a body, that would limit complex material setup on trimeshes or compound collisions, in such case you can use a custom material setup in following way:

NewtonContactsProcess callback sends you the contact "joint" object pointer which you can iterate using (NewtonContactJointGetContactCount, NewtonContactJointGetFirstContact, NewtonContactJointGetNextContact).

With material contact functions you can then control individual customized collision contact response, this are:

NewtonMaterialSetContactSoftness
NewtonMaterialSetContactThickness
NewtonMaterialSetContactElasticity
NewtonMaterialSetContactFrictionState
NewtonMaterialSetContactFrictionCoef
NewtonMaterialSetContactNormalAcceleration
NewtonMaterialSetContactNormalDirection
NewtonMaterialSetContactPosition
NewtonMaterialSetContactTangentFriction
NewtonMaterialSetContactTangentAcceleration
NewtonMaterialContactRotateTangentDirections
NewtonMaterialGetContactPruningTolerance
NewtonMaterialSetContactPruningTolerance