LUADOC - Farming Simulator 17

Printable Version

TipUtil

Description
TipUtil
Functions

registerDensityMapHeightType

Description
Register density map height type
Definition
registerDensityMapHeightType(integer fillType, float maxSurfaceAngle, float collisionScale, float collisionBaseOffset, float minCollisionOffset, float maxCollisionOffset, float fillToGroundScale, boolean allowsSmoothing, string diffuseMapFilename, string normalMapFilename, string distanceFilename)
Arguments
integerfillTypefill type
floatmaxSurfaceAnglemax surface angle in radians
floatcollisionScalescale of collision
floatcollisionBaseOffsetoffset of collision
floatminCollisionOffsetmin collision offset
floatmaxCollisionOffsetmax collision offset
floatfillToGroundScalefill to ground scale
booleanallowsSmoothingallows smoothing
stringdiffuseMapFilenamediffuse map filename
stringnormalMapFilenamenormal map filename
stringdistanceFilenamedistance map filename

getMinValidLiterValue

Description
Returns min valid liter value to tip on ground
Definition
getMinValidLiterValue(integer fillType)
Arguments
integerfillTypefill type
Return Values
floatminValidLitermin valid liter

getCanTipToGround

Description
Returns of can tip to ground
Definition
getCanTipToGround(integer fillType)
Arguments
integerfillTypefill type
Return Values
booleancanTipcan tip to ground

getFillTypeAtLine

Description
Returns fill type at line
Definition
getFillTypeAtLine(float sx, float sy, float sz, float ex, float ey, float ez, float radius)
Arguments
floatsxstart x position
floatsystart y position
floatszstart z position
floatexend x position
floateyend y position
floatezend z position
floatradiusradius to check
Return Values
integerfillTypefill type found

getFillLevelAtArea

Description
Returns fill level at area
Definition
getFillLevelAtArea(integer fillType, float x0, float z0, float x1, float z1, float x2, float z2)
Arguments
integerfillTypefill type to check
floatx0start x position
floatz0start z position
floatx1width x position
floatz1width z position
floatx2heigth x position
floatz2height z position
Return Values
floatfillLevelfill level found

getHeightAtWorldPos

Description
Returns density height at world pos
Definition
getHeightAtWorldPos(float x, float y, float z)
Arguments
floatxworld x position
floatyworld y position
floatzworld z position
Return Values
floatdensityHeightdensity height

tipToGroundAroundLine

Description
Returns fill type at line
Definition
tipToGroundAroundLine(table vehicle, float delta, integer filltype, float sx, float sy, float sz, float ex, float ey, float ez, float innerRadius, float radius, float lineOffset, boolean limitToLineHeight, table occlusionAreas, boolean useOcclusionAreas)
Arguments
tablevehiclevehicle that is tipping
floatdeltadelta to tip
integerfilltypefill type to tip
floatsxstart x position
floatsystart y position
floatszstart z position
floatexend x position
floateyend y position
floatezend z position
floatinnerRadiusinner radius
floatradiusradius
floatlineOffsetline offset
booleanlimitToLineHeightlimit to line height
tableocclusionAreasocclusion areas
booleanuseOcclusionAreasuse occlusion areas
Return Values
floatdroppedreal fill level dropped
floatlineOffsetline offset

removeFromGroundByArea

Description
Removes density from fill type in given area
Definition
removeFromGroundByArea(float x0, float z0, float x1, float z1, float x2, float z2, integer fillType)
Arguments
floatx0start x position
floatz0start z position
floatx1width x position
floatz1width z position
floatx2heigth x position
floatz2height z position
integerfillTypefill type to remove
Return Values
floatfillLevelfill level removed

changeFillTypeAtArea

Description
Change fill type at area
Definition
changeFillTypeAtArea(float x0, float z0, float x1, float z1, float x2, float z2, integer fillType, integer newFillType)
Arguments
floatx0start x position
floatz0start z position
floatx1width x position
floatz1width z position
floatx2heigth x position
floatz2height z position
integerfillTypeold fill type
integernewFillTypenew fill type
Return Values
floatfillLevelfill level changed