GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • Game
      • GameElement
      • GameEventHandler
      • GenesisWindow
      • IGameBehavior
      • Input
      • Layer
      • Light
      • Scene
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • CapsuleCollider
      • ConvexHullBehavior
      • QubeConvexHull
      • SphereCollider
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • Model
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
    • Genesis.Graphics
      • Animation
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Glyphe
      • IRenderDevice
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • Shader
      • ShaderProgram
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • ClassicGL
      • GLRenderer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • FrameShape
      • GlypheShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • HitResult
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Raycast
    • Genesis.UI
      • Canvas
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget

    Class Terrain3D

    Represents a 3D terrain element.

    Inheritance
    object
    GameElement
    Terrain3D
    Inherited Members
    GameElement.OnUpdate(Game, IRenderDevice)
    GameElement.OnDestroy(Game)
    GameElement.AddBehavior<T>(T)
    GameElement.AddBehavior(IGameBehavior)
    GameElement.GetBehavior<T>()
    GameElement.GetBehaviors<T>()
    GameElement.AddChild(GameElement)
    GameElement.GetInstance(GameElement)
    GameElement.Name
    GameElement.Tag
    GameElement.Location
    GameElement.Rotation
    GameElement.Size
    GameElement.Behaviors
    GameElement.Scene
    GameElement.Enabled
    GameElement.Propertys
    GameElement.Children
    GameElement.Parent
    GameElement.UUID
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Core.GameElements
    Assembly: Genesis.dll
    Syntax
    public class Terrain3D : GameElement

    Constructors

    Terrain3D(string, Vec3)

    Initializes a new instance of the Terrain3D class with default values.

    Declaration
    public Terrain3D(string name, Vec3 location)
    Parameters
    Type Name Description
    string name

    The name of the terrain.

    Vec3 location

    The initial location of the terrain.

    Terrain3D(string, Vec3, int, int, int, int)

    Initializes a new instance of the Terrain3D class with specified name, location, cell counts, and cell dimensions.

    Declaration
    public Terrain3D(string name, Vec3 location, int cellsX, int cellsZ, int cellWidth, int cellHeight)
    Parameters
    Type Name Description
    string name

    The name of the terrain.

    Vec3 location

    The initial location of the terrain.

    int cellsX

    The number of cells in the X direction.

    int cellsZ

    The number of cells in the Z direction.

    int cellWidth

    The width of each cell.

    int cellHeight

    The height of each cell.

    Terrain3D(string, Vec3, float, Bitmap)

    Initializes a new instance of the Terrain3D class with specified name, location, height value, and heightmap.

    Declaration
    public Terrain3D(string name, Vec3 location, float heightValue, Bitmap heightmap)
    Parameters
    Type Name Description
    string name

    The name of the terrain.

    Vec3 location

    The initial location of the terrain.

    float heightValue

    The height value of the terrain.

    Bitmap heightmap

    The heightmap for generating the terrain.

    Properties

    AltColor

    Gets or sets the alternate color of the terrain.

    Declaration
    public Color AltColor { get; set; }
    Property Value
    Type Description
    Color

    Color

    Gets or sets the color of the terrain.

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    Color

    TerrainData

    Gets or sets the terrain data.

    Declaration
    public TerrainData TerrainData { get; set; }
    Property Value
    Type Description
    TerrainData

    Methods

    CreateTerrainTileColor(Color)

    Creates color data for a terrain tile.

    Declaration
    public static float[] CreateTerrainTileColor(Color color)
    Parameters
    Type Name Description
    Color color
    Returns
    Type Description
    float[]

    GenerateTerrain(Bitmap, float, float)

    Generates terrain data from a heightmap.

    Declaration
    public static TerrainData GenerateTerrain(Bitmap heightmap, float heightScale, float cellSize)
    Parameters
    Type Name Description
    Bitmap heightmap
    float heightScale
    float cellSize
    Returns
    Type Description
    TerrainData

    GenerateTerrainData(int, int, int, int, Color, Color)

    Generates terrain data based on specified parameters.

    Declaration
    public static TerrainData GenerateTerrainData(int cellsX, int cellsZ, int cellWidth, int cellHeight, Color colorA, Color colorB)
    Parameters
    Type Name Description
    int cellsX
    int cellsZ
    int cellWidth
    int cellHeight
    Color colorA
    Color colorB
    Returns
    Type Description
    TerrainData

    GenerateTerrainTile(float, float, int, int)

    Generates a tile for the terrain grid.

    Declaration
    public static float[] GenerateTerrainTile(float x, float z, int cellWidth, int cellHeight)
    Parameters
    Type Name Description
    float x
    float z
    int cellWidth
    int cellHeight
    Returns
    Type Description
    float[]

    Init(Game, IRenderDevice)

    Initializes the terrain element.

    Declaration
    public override void Init(Game game, IRenderDevice renderDevice)
    Parameters
    Type Name Description
    Game game
    IRenderDevice renderDevice
    Overrides
    GameElement.Init(Game, IRenderDevice)

    OnRender(Game, IRenderDevice)

    Renders the terrain element.

    Declaration
    public override void OnRender(Game game, IRenderDevice renderDevice)
    Parameters
    Type Name Description
    Game game
    IRenderDevice renderDevice
    Overrides
    GameElement.OnRender(Game, IRenderDevice)
    In this article
    Back to top Generated by DocFX