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 Model

    Represents a 3D model in the game.

    Inheritance
    object
    GameElement
    Model
    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 Model : GameElement

    Constructors

    Model(string, Vec3, string)

    Constructs a new instance of the Model class.

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

    Properties

    AnimationSpeed

    Gets or sets the speed of animation playback.

    Declaration
    public float AnimationSpeed { get; set; }
    Property Value
    Type Description
    float

    Animations

    Gets or sets the list of animations associated with the model.

    Declaration
    public List<Animation> Animations { get; set; }
    Property Value
    Type Description
    List<Animation>

    Animator

    Gets or sets the animator responsible for controlling animations.

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

    BoneCounter

    Gets or sets the counter for bones in the model.

    Declaration
    public int BoneCounter { get; set; }
    Property Value
    Type Description
    int

    BoneInfoMap

    Gets or sets the mapping of bone names to bone information.

    Declaration
    public Dictionary<string, boneinfo> BoneInfoMap { get; set; }
    Property Value
    Type Description
    Dictionary<string, boneinfo>

    FileDirectory

    Gets or sets the directory of the model file.

    Declaration
    public string FileDirectory { get; set; }
    Property Value
    Type Description
    string

    FileName

    Gets or sets the name of the model file.

    Declaration
    public string FileName { get; set; }
    Property Value
    Type Description
    string

    Materials

    Gets or sets the list of materials used by the model.

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

    Meshes

    Gets or sets the list of meshes composing the model.

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

    Shader

    Gets or sets the shader program used for rendering the model.

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

    Methods

    ExtractAnimations(Scene)

    Extracts animations from the imported model.

    Declaration
    public void ExtractAnimations(Scene scene)
    Parameters
    Type Name Description
    Scene scene

    ExtractMaterials(Scene)

    Extracts materials information from the imported model.

    Declaration
    public void ExtractMaterials(Scene scene)
    Parameters
    Type Name Description
    Scene scene

    ExtractMeshes(Scene)

    Extracts mesh data from the imported model.

    Declaration
    public void ExtractMeshes(Scene scene)
    Parameters
    Type Name Description
    Scene scene

    FindAnimation(string)

    Finds an animation with the specified name.

    Declaration
    public Animation FindAnimation(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    Animation

    Init(Game, IRenderDevice)

    Initializes the model within the game environment.

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

    OnDestroy(Game)

    Cleans up resources associated with the model when destroyed.

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

    OnRender(Game, IRenderDevice)

    Renders the model within the game environment.

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

    OnUpdate(Game, IRenderDevice)

    Updates the model within the game environment.

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

    PlayAnimation(string)

    Plays the specified animation on the model.

    Declaration
    public void PlayAnimation(string name)
    Parameters
    Type Name Description
    string name
    In this article
    Back to top Generated by DocFX