GFX
  • Docs
  • API
Search Results for

    Show / Hide Table of Contents
    • Genesis.Core
      • AssetManager
      • DirectionalLight
      • Game
      • GameElement
      • GameEventHandler
      • IGameBehavior
      • Input
      • Input.Keys
      • Layer
      • Light
      • Light2D
      • PointLight
      • Scene
      • Scene2D
      • Scene3D
      • SceneEventHandler
      • SceneSizeEvenHandler
      • Storage
      • Utils
      • Window
      • Window.WindowEventHandler
      • WindowUtilities
      • WindowUtilities.POINT
      • WindowUtilities.RECT
    • Genesis.Core.Behaviors
      • AnimationBehavior
      • CameraFlags
      • CharacterController2D
      • ControllerPreset
      • MoveDirection
      • MovementFlags
      • SpriteMovementController
    • Genesis.Core.Behaviors.Physics2D
      • BoxCollider
      • BoxRigidBody
      • BoxTrigger2D
      • BufferedSpriteCollider
      • PhysicsBox2D
      • PhysicsPolygon2D
      • Rigidbody2D
    • Genesis.Core.Behaviors.Physics3D
      • BoxCollider
      • BoxRigidBody
      • BoxTrigger
      • CapsuleCollider
      • CapsuleRigidBody
      • CompoundMeshCollider
      • ConvexHullBehavior
      • ConvexHullCollider
      • MeshCollider
      • QubeConvexHull
      • SphereCollider
      • SphereRigidBody
      • SphereTrigger
      • StaticMeshBehavior
    • Genesis.Core.Behaviors._3D
      • Stance
      • ThirdpersonCharacterController
    • Genesis.Core.GameElements
      • BufferedSprite
      • CameraElement
      • Element3D
      • Empty
      • FindPathAsynchResult
      • GridCell
      • Model
      • NavMesh
      • Obstacle
      • ParticleBuffers
      • ParticleDeffinition
      • ParticleEmitter
      • Qube
      • RectElement
      • Skybox
      • Sphere
      • Sprite
      • SpriteShapeDeffinition
      • Terrain2D
      • Terrain3D
      • TerrainData
      • Waypoint
    • Genesis.Graphics
      • Animation
      • AnimationCallback
      • AnimationCallback.AnimationEvent
      • Camera
      • CameraType
      • Face
      • Font
      • Framebuffer
      • Frustum
      • Glyphe
      • IRenderDevice
      • InstancedElement
      • InstancedMesh
      • Material
      • MaterialBuffer
      • Mesh
      • PerspectiveCamera
      • RenderInstanceContainer
      • RenderSettings
      • Shader
      • ShaderProgram
      • SpriteSheet
      • TexCoords
      • Texture
      • Viewport
    • Genesis.Graphics.Animation3D
      • Animation
      • Animator
      • AssimpNodeData
      • Bone
      • KeyPosition
      • KeyRotation
      • KeyScale
      • ModelMesh
      • boneinfo
      • vertex
    • Genesis.Graphics.Physics
      • BulletDebugRenderer
    • Genesis.Graphics.RenderDevice
      • GLRenderer
      • LegacyRenerer
    • Genesis.Graphics.Shaders.OpenGL
      • AnimatedModelShader
      • BasicShader
      • BorderCircleShader
      • DiffuseLightning
      • DiffuseNormalLightning
      • DiffuseNormalShader
      • DiffuseShader
      • DiffuseSolidShader
      • Element3DShader
      • FXScreenSpaceShadowShader
      • InstanceShader2D
      • InstancedShader
      • Light2DShader
      • LightmapShader
      • MVPRectShader
      • MVPShader
      • MVPSolidShader
      • ParticleShader
      • ScreenShader
      • SkyboxShader
      • SolidShapeShader
      • SpecularShader
      • SpriteShader
      • TerrainShader
      • WireframeShader
    • Genesis.Graphics.Shapes
      • BufferedSpriteShape
      • CircleShape
      • FrameShape
      • GlypheShape
      • Light2DShape
      • LineShape
      • PlaneShape
      • QubeShape
      • RectShape
      • Shape
      • SphereShape
      • SpriteShape
    • Genesis.Math
      • Matrix4x4
      • NoisePoint
      • PerlinNoise
      • Rect
      • Vec3
    • Genesis.Physics
      • Aabb
      • ColliderBehavior2D
      • ColliderBehavior3D
      • CollisionGroup
      • CollisionGroupExtensions
      • HitResult
      • HitResult2D
      • MatrixSet
      • MouseRay2
      • PhysicHandler
      • PhysicHandlerEvent
      • PhysicPropeterys
      • PhysicsBehavior
      • PhysicsBehaviorEvent
      • PhysicsHandler2D
      • PhysicsHandler3D
      • Ray2D
      • Raycast
      • Raycast2D
      • RigidBodyBehavior2D
      • RigidBodyBehavior3D
      • TriggerBehavior2D
      • TriggerBehavior3D
    • Genesis.UI
      • Button
      • Canvas
      • GridView
      • ImageButton
      • Label
      • ListItem
      • ListItemBehavior
      • ListSelector
      • ListSelectorBehavior
      • Panel
      • ProgressBar
      • UIEvent
      • UIParseHandler
      • UIParser
      • Widget
      • WidgetAnchor
    • Genesis.UI.Items
      • GridViewImageIcon
      • IItem

    Class Animation

    Represents an animation associated with a 3D model.

    Inheritance
    object
    Animation
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Graphics.Animation3D
    Assembly: Genesis.dll
    Syntax
    public class Animation

    Constructors

    Animation(Scene, Model, int)

    Initializes a new instance of the Animation class.

    Declaration
    public Animation(Scene scene, Model model, int index)
    Parameters
    Type Name Description
    Scene scene
    Model model
    int index

    Properties

    BoneInfoMap

    Mapping of bone names to bone information.

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

    Bones

    List of bones affected by the animation.

    Declaration
    public List<Bone> Bones { get; set; }
    Property Value
    Type Description
    List<Bone>

    Duration

    Duration of the animation in ticks.

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

    Name

    Name of the animation.

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

    RootNode

    Root node of the animation's scene hierarchy.

    Declaration
    public AssimpNodeData RootNode { get; set; }
    Property Value
    Type Description
    AssimpNodeData

    TicksPerSecond

    Number of ticks per second for the animation.

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

    Methods

    AnimationLength()

    Calculates the keyframe length of the animation based on the maximum number of position, rotation, and scaling keyframes among all bones.

    Declaration
    public int AnimationLength()
    Returns
    Type Description
    int

    The maximum number of keyframes (positions, rotations, or scalings) among all bones; if no bones are present, returns -1.

    Remarks

    This method iterates through all bones to determine the maximum keyframe length.

    FindBone(string)

    Finds a bone with the specified name.

    Declaration
    public Bone FindBone(string name)
    Parameters
    Type Name Description
    string name
    Returns
    Type Description
    Bone

    GetKeyFrameIndex(float)

    Gets the keyframe index at a specific animation time based on the first bone.

    Declaration
    public int GetKeyFrameIndex(float animationTime)
    Parameters
    Type Name Description
    float animationTime

    The time within the animation to find the keyframe index for.

    Returns
    Type Description
    int

    The highest keyframe index (position, rotation, or scale) at the specified animation time.

    Remarks

    This method assumes that all keyframe lists (positions, rotations, scales) are synchronized and have the same number of keyframes. It calculates the keyframe index for the first bone in the list.

    In this article
    Back to top Generated by DocFX