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 Element3D

    Represents a 3D element in the game world, such as a 3D model with shaders.

    Inheritance
    object
    GameElement
    Element3D
    Skybox
    Inherited Members
    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 Element3D : GameElement

    Constructors

    Element3D(string, string, Vec3, Vec3, Vec3)

    Initializes a new instance of the Element3D class with specified parameters.

    Declaration
    public Element3D(string name, string path, Vec3 location, Vec3 rotation, Vec3 scale)
    Parameters
    Type Name Description
    string name

    The name of the 3D element.

    string path

    The file path to the 3D model.

    Vec3 location

    The initial location of the 3D element.

    Vec3 rotation

    The initial rotation of the 3D element.

    Vec3 scale

    The initial scale of the 3D element.

    Properties

    HasTransparancy

    Gets or sets a value indicating whether the object has transparency.

    Declaration
    public bool HasTransparancy { get; set; }
    Property Value
    Type Description
    bool

    Materials

    Gets or sets the materials from the model

    Declaration
    public List<Material> Materials { get; set; }
    Property Value
    Type Description
    List<Material>

    Meshes

    Gets or sets the meshes from the model

    Declaration
    public List<Mesh> Meshes { get; set; }
    Property Value
    Type Description
    List<Mesh>

    Shader

    Gets or sets the shader program associated with this 3D element.

    Declaration
    public ShaderProgram Shader { get; set; }
    Property Value
    Type Description
    ShaderProgram

    Methods

    GetMaterialBuffers(Material)

    Gets the material buffers for a specific material index.

    Declaration
    public MaterialBuffer GetMaterialBuffers(Material material)
    Parameters
    Type Name Description
    Material material

    The material index.

    Returns
    Type Description
    MaterialBuffer

    A MaterialBuffer containing vertex, normal, and texture coordinate data.

    GetShape()

    Gets the shape data of the 3D element.

    Declaration
    public float[] GetShape()
    Returns
    Type Description
    float[]

    An array representing the shape data.

    Init(Game, IRenderDevice)

    Called when the game is being initialized. Override to provide custom initialization logic.

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

    The game instance.

    IRenderDevice renderDevice

    The render device used for rendering.

    Overrides
    GameElement.Init(Game, IRenderDevice)

    OnDestroy(Game)

    Called when the game element is being destroyed. Override to provide custom cleanup logic.

    Declaration
    public override void OnDestroy(Game game)
    Parameters
    Type Name Description
    Game game

    The game instance.

    Overrides
    GameElement.OnDestroy(Game)

    OnRender(Game, IRenderDevice)

    Called when the game is being rendered. Override to provide custom rendering logic.

    Declaration
    public override void OnRender(Game game, IRenderDevice renderDevice)
    Parameters
    Type Name Description
    Game game

    The game instance.

    IRenderDevice renderDevice

    The render device used for rendering.

    Overrides
    GameElement.OnRender(Game, IRenderDevice)

    OnUpdate(Game, IRenderDevice)

    Called when the game is being updated. Override to provide custom update logic.

    Declaration
    public override void OnUpdate(Game game, IRenderDevice renderDevice)
    Parameters
    Type Name Description
    Game game

    The game instance.

    IRenderDevice renderDevice

    The render device used for rendering.

    Overrides
    GameElement.OnUpdate(Game, IRenderDevice)
    In this article
    Back to top Generated by DocFX