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 Raycast2D

    Provides methods to perform raycasting in a 2D scene and retrieve intersection information.

    Inheritance
    object
    Raycast2D
    Inherited Members
    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 Raycast2D

    Constructors

    Raycast2D()

    Declaration
    public Raycast2D()

    Methods

    PerformCastAll(Ray2D, GameElement[])

    Casts a ray against an array of game elements and returns all hit results.

    Declaration
    public static List<HitResult2D> PerformCastAll(Ray2D ray, GameElement[] elements)
    Parameters
    Type Name Description
    Ray2D ray

    The 2D ray to cast.

    GameElement[] elements

    An array of game elements to test for intersections.

    Returns
    Type Description
    List<HitResult2D>

    A list of HitResult2D containing all intersection results.

    PerformCastAll(Ray2D, Scene)

    Casts a ray in a scene and returns all hit results for elements intersected by the ray.

    Declaration
    public static List<HitResult2D> PerformCastAll(Ray2D ray, Scene scene)
    Parameters
    Type Name Description
    Ray2D ray

    The 2D ray to cast.

    Scene scene

    The scene containing elements to test for intersections.

    Returns
    Type Description
    List<HitResult2D>

    A list of HitResult2D representing all intersection results.

    RayIntersects(Ray2D, Vec3, Vec3, out Vec3)

    Performs the actual intersection test between a 2D ray and an AABB defined by its minimum and maximum points.

    Declaration
    public static bool RayIntersects(Ray2D ray, Vec3 min, Vec3 max, out Vec3 intersectionPoint)
    Parameters
    Type Name Description
    Ray2D ray

    The 2D ray to test.

    Vec3 min

    The minimum point of the AABB.

    Vec3 max

    The maximum point of the AABB.

    Vec3 intersectionPoint

    If there is an intersection, this will contain the intersection point.

    Returns
    Type Description
    bool

    True if the ray intersects with the AABB, false otherwise.

    RayIntersectsAABB(Ray2D, Aabb, out Vec3)

    Checks if a 2D ray intersects with an Axis-Aligned Bounding Box (AABB).

    Declaration
    public static bool RayIntersectsAABB(Ray2D ray, Aabb aabb, out Vec3 intersectionPoint)
    Parameters
    Type Name Description
    Ray2D ray

    The 2D ray to test.

    Aabb aabb

    The AABB defined by its minimum and maximum points.

    Vec3 intersectionPoint

    If there is an intersection, this will contain the intersection point.

    Returns
    Type Description
    bool

    True if the ray intersects with the AABB, false otherwise.

    In this article
    Back to top Generated by DocFX