GE Lua Documentation

Press F to search!

getTerrainNormal

Definition


-- @/lua/ge/extensions/core/terrain.lua:28

local function getTerrainNormal(point)
  local terrain = getTerrain()
  if terrain then
    return terrain:getNormal(point, true, true)
  end
end

Callers

@/lua/ge/extensions/editor/toolUtilities/geom.lua
-- Returns the normal of the terrain at the given world-space point.
local function getTerrainNormal(p)
  local tb = extensions.editor_terrainEditor.getTerrainBlock()
@/lua/ge/extensions/editor/drivePathEditor/splineMgr.lua
      for j = 1, numPoints do
        spline.nmls[j] = geom.getTerrainNormal(pointsWS[j]) -- Compute the normals for each node.
      end
@/lua/ge/extensions/editor/meshSpline/splineMgr.lua
      for j = 1, numPoints do
        spline.nmls[j] = geom.getTerrainNormal(pointsWS[j]) -- Compute the normals for each node.
      end
@/lua/ge/extensions/editor/assemblySpline/splineMgr.lua
      for j = 1, numPoints do
        spline.nmls[j] = geom.getTerrainNormal(pointsWS[j]) -- Compute the normals for each node.
      end
@/lua/ge/extensions/editor/masterSpline/splineMgr.lua
              node.z = terrain:getHeight(node) -- Update the node height to what the local terrain has.
              nmls[j] = geom.getTerrainNormal(node) -- Update the normal to what the local terrain has.
            end
      for j = 1, numPoints do
        spline.nmls[j] = geom.getTerrainNormal(pointsWS[j]) -- Compute the normals for each node.
      end
@/lua/ge/extensions/editor/roadSpline/groupMgr.lua
      for j = 1, numPoints do
        group.nmls[j] = geom.getTerrainNormal(pointsWS[j]) -- Compute the normals for each node.
      end
@/lua/ge/extensions/editor/decalSpline/splineMgr.lua
      for j = 1, numPoints do
        spline.nmls[j] = geom.getTerrainNormal(pointsWS[j]) -- Compute the normals for each node.
      end