dumpGroundModels
Definition
-- @/lua/ge/extensions/core/environment.lua:607
local function dumpGroundModels()
local gmCount = be:getGroundModelCount()
local gms = {}
for i = 0, gmCount do
local gm = be:getGroundModelByID(i)
if gm.data then
gm = gm.data
gms[gm.name or i] = {
id = i,
roughnessCoefficient = gm.roughnessCoefficient,
defaultDepth = gm.defaultDepth,
staticFrictionCoefficient = gm.staticFrictionCoefficient,
slidingFrictionCoefficient = gm.slidingFrictionCoefficient,
hydrodynamicFriction = gm.hydrodynamicFriction or gm.hydrodnamicFriction,
stribeckVelocity = gm.stribeckVelocity,
strength = gm.strength,
collisiontype = gm.collisiontype,
fluidDensity = gm.fluidDensity,
flowConsistencyIndex = gm.flowConsistencyIndex,
flowBehaviorIndex = gm.flowBehaviorIndex or gm.flowBehaviourIndex, -- omg ...
dragAnisotropy = gm.dragAnisotropy,
skidMarks = gm.skidMarks,
shearStrength = gm.shearStrength
}
end
end
jsonWriteFile('groundmodels_dump.json', gms, true)
end
Callers