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

    Struct Rect

    Represents a rectangle with position and dimensions.

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Genesis.Math
    Assembly: Genesis.dll
    Syntax
    public struct Rect

    Constructors

    Rect(Vec3, Vec3)

    Initializes a new instance of the Rect class with the specified location and size.

    Declaration
    public Rect(Vec3 location, Vec3 size)
    Parameters
    Type Name Description
    Vec3 location

    The location of the rectangle.

    Vec3 size

    The size of the rectangle.

    Rect(float, float, float, float)

    Constructor for the Rect class that initializes the rectangle with specified position and dimensions.

    Declaration
    public Rect(float x, float y, float width, float height)
    Parameters
    Type Name Description
    float x

    The X-coordinate of the rectangle.

    float y

    The Y-coordinate of the rectangle.

    float width

    The width of the rectangle.

    float height

    The height of the rectangle.

    Properties

    Height

    Gets or sets the height of the rectangle.

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

    Width

    Gets or sets the width of the rectangle.

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

    X

    Gets or sets the X-coordinate of the rectangle.

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

    Y

    Gets or sets the Y-coordinate of the rectangle.

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

    Methods

    Contains(float, float)

    Checks if a point with specified coordinates is contained within the rectangle.

    Declaration
    public bool Contains(float x, float y)
    Parameters
    Type Name Description
    float x

    The X-coordinate of the point.

    float y

    The Y-coordinate of the point.

    Returns
    Type Description
    bool

    True if the point is contained within the rectangle, otherwise false.

    GetLocation()

    Returns the location from the rect

    Declaration
    public Vec3 GetLocation()
    Returns
    Type Description
    Vec3

    GetSize()

    Declaration
    public Vec3 GetSize()
    Returns
    Type Description
    Vec3

    Intersects(Rect)

    Checks if the current rectangle intersects with another rectangle.

    Declaration
    public bool Intersects(Rect rect)
    Parameters
    Type Name Description
    Rect rect

    The other rectangle to check for intersection.

    Returns
    Type Description
    bool

    True if the rectangles intersect, otherwise false.

    ToString()

    Converts the rectangle to a string representation in the format "X;Y;Width;Height".

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    A string representation of the rectangle.

    Overrides
    ValueType.ToString()
    In this article
    Back to top Generated by DocFX