Universe.Physics.BulletSPlugin.BSTerrainPhys.GetTerrainHeightAtXYZ C# (CSharp) Method

GetTerrainHeightAtXYZ() public abstract method

public abstract GetTerrainHeightAtXYZ ( System.Vector3 pos ) : float
pos System.Vector3
return float
        public abstract float GetTerrainHeightAtXYZ(Vector3 pos);
        public abstract float GetWaterLevelAtXYZ(Vector3 pos);

Usage Example

        public float GetTerrainHeightAtXYZ(Vector3 pos)
        {
            float tX = pos.X;
            float tY = pos.Y;

            // You'd be surprized at the number of times this routine is called
            //    with the same parameters as last time.
            if (!m_terrainModified && (lastHeightTX == tX) && (lastHeightTY == tY))
            {
                return(lastHeight);
            }
            m_terrainModified = false;

            lastHeightTX = tX;
            lastHeightTY = tY;
            return(lastHeight = m_terrain.GetTerrainHeightAtXYZ(pos));
        }