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 PhysicsHandler2D

    Represents a 2D physics handler responsible for managing physics simulation in a game.

    Inheritance
    object
    PhysicHandler
    PhysicsHandler2D
    Inherited Members
    PhysicHandler.Callbacks
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Genesis.Physics
    Assembly: Genesis.dll
    Syntax
    public class PhysicsHandler2D : PhysicHandler

    Constructors

    PhysicsHandler2D(float, float)

    Initializes a new instance of the PhysicsHandler2D class with specified gravity values.

    Declaration
    public PhysicsHandler2D(float gravityX, float gravityY)
    Parameters
    Type Name Description
    float gravityX

    The X component of gravity.

    float gravityY

    The Y component of gravity.

    Properties

    PhysicsWorld

    Gets or sets the 2D physics world used for simulation.

    Declaration
    public DiscreteDynamicsWorld PhysicsWorld { get; set; }
    Property Value
    Type Description
    DiscreteDynamicsWorld

    ProcessPhysics

    Gets or sets a flag indicating whether physics simulation should be processed.

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

    Substepps

    Gets ore sets the substepps for physic simulation

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

    TickRate

    Gets or sets the tick rate for physics simulation.

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

    Methods

    ManageElement(PhysicsBehavior)

    Manages a physics behavior element by adding its RigidBody to the physics world.

    Declaration
    public override void ManageElement(PhysicsBehavior rigidBody)
    Parameters
    Type Name Description
    PhysicsBehavior rigidBody

    The PhysicsBehavior representing the rigid body element.

    Overrides
    PhysicHandler.ManageElement(PhysicsBehavior)

    Process(Scene, Game)

    Processes the physics simulation for the given scene and game.

    Declaration
    public override void Process(Scene scene, Game game)
    Parameters
    Type Name Description
    Scene scene

    The current game scene.

    Game game

    The current game instance.

    Overrides
    PhysicHandler.Process(Scene, Game)
    In this article
    Back to top Generated by DocFX