LogoLogo
Scripting DocsSupport
Scripting
Scripting
  • Sinespace Scripting Documentation
  • Client Scripting
    • Viewer
      • SDialogues
      • SInput
      • SShared
      • SUI
    • Network
      • SChat
      • SNetwork
      • SPhotos
      • SVideos
      • SWebService
    • Player
      • SEconomy
      • SGroup
      • SInventory
      • SProfile
      • SQuests
    • Region
      • SCameraManager
      • SGrid
      • SHost
      • SPersistence
      • SPhysics
      • SPostFX
      • SScene
      • SScript
      • SRenderSettings
    • Components
      • SAnimation
      • SAnimator
      • SAudioReactiveAnimation
      • SAudioReactiveBase
      • SAudioReactiveLight
      • SAudioReactiveMaterial
      • SAudioReactiveParticleSystem
      • SAudioReactiveTransform
      • SAudioSource
      • SBoxCollider
      • SBrowserSurface
      • SCamera
      • SCanvasGroup
      • SCapsuleCollider
      • SCharacterController
      • SClickable
      • SCloth
      • SCollider
      • SContentSizeFitter
      • SEmbeddedVideo
      • SEventCalendar
      • SFurniture
      • SGraphicRaycaster
      • SHingeJoint
      • SLight
      • SLineRenderer
      • SMeshRenderer
      • SModularVehicle
      • SNavMeshAgent
      • SNavMeshObstacle
      • SNetworking
      • SParticleSystem
      • SPlayableDirector
      • SPostProcessVolume
      • SRectTransform
      • SReflectionProbe
      • SRenderer
      • SRigidbody
      • SRoomFloor
      • SSceneBackgroundMusic
      • SScriptingData
      • SScriptingEvents
      • SScriptingResources
      • SScriptingRuntime
      • SSeat
      • SSkinnedMeshRenderer
      • SSphereCollider
      • SStateMachine
      • STerrain
      • STrailRenderer
      • SUIButton
      • SUICanvas
      • SUIDropdown
      • SUIImage
      • SUIInputField
      • SUILayout
      • SUIRawImage
      • SUIScrollbar
      • SUISlider
      • SUIText
      • SUIToggle
      • SUIToolTipHint
      • SVirtualCamera
      • SVoiceZone
    • Types
      • SAnimationState
      • SAnimatorStateInfo
      • SAvatar
      • SAvatarAppearance
      • SChatMessage
      • SColor
      • SCommandBuffer
      • SDateTime
      • SGameObject
      • SGenre
      • SGroupInfo
      • SInventoryItem
      • SJointLimits
      • SJointMotor
      • SJointSpring
      • SLandmark
      • SLayerMask
      • SMaterial
      • SMath
      • SMusicDirectory
      • SMusicStation
      • SMusicStationList
      • SNetworkMessageLua
      • SOutfit
      • SParticle
      • SPhysicsHit
      • SPublicRegion
      • SQuaternion
      • SRay
      • SRect
      • SResource
      • SScore
      • SScoreRank
      • SString
      • SSubRegion
      • STrackInfo
      • STuneIn
      • SUIRaycastResult
      • SUserRegions
      • SVector
      • SUserProfile
      • SSocialMedia
      • SWebResponse
  • Server Scripting
    • Library
      • SMath
    • Network
      • SShared
      • SWebservice
    • Region
      • SAvatar
      • SCell
      • SObject
      • SParcel
      • SParcelManager
      • SRegionScript
      • SScene
    • Storage
      • SDatabase
  • Guides
    • Persistence
    • Server Scripts
  • Sample Projects
    • Smart Lights
    • Trivia Box
  • Changelog
    • API Changelog
  • Support
    • Report An Issue
Powered by GitBook

Sinespace® is a registered trademark of Sine Wave Entertainment Ltd, All Rights Reserved.

On this page
  • Index
  • Functions Index
  • Properties Index
  • Functions
  • Contains
  • Overlaps
  • Equals
  • ToString
  • New
  • Properties
  • X
  • Y
  • Width
  • Height
  • Position
  • Center
  • Min
  • Max
  • Size
  • XMin
  • YMin
  • XMax
  • YMax
  • Left
  • Right
  • Top
  • Bottom

Was this helpful?

Export as PDF
  1. Client Scripting
  2. Types

SRect

Index

Functions Index

Function

Static Functions

Properties Index

Property

Functions

Contains

Returns true if the x and y components of point is a point inside this rectangle. If allowInverse is present and true, the width and height of the Rect are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.

Parameter
Type
Description

newRect=Rect.New(0,0,150,150)
otherRect = Rect.New(0,0,150,150)

isContains = newRect.Contains(otherRect)
--or
isContains = newRect.Contains(otherRect , true)

Overlaps

bool Overlaps (SRect other) bool Overlaps (SRect other, bool allowInverse)

Returns true if the other rectangle overlaps this one. If allowInverse is present and true, the widths and heights of the Rects are allowed to take negative values (ie, the min value is greater than the max), and the test will still work.

Parameter
Type
Description

newRect=Rect.New(0,0,150,150)
otherRect = Rect.New(0,0,150,150)

isOverlapping = newRect.Overlaps(otherRect)
--or
isOverlapping = newRect.Overlaps(otherRect , true)

Equals

bool Equals (SRect other)

Returns true if the rectangles are the same.

Parameter
Type
Description

newRect=Rect.New(0,0,150,150)
otherRect = Rect.New(0,0,150,150)
AreEqual = newRect.Equals(otherRect)

ToString

string ToString (string format) string ToString ()

Returns string for this Rect.

Parameter
Type
Description

newRect=Rect.New(0,0,150,150)
otherRect = Rect.New(0,0,150,150)
AreEqual = newRect.Equals(otherRect)

New

static SRect New (float x, float y, float width, float height)

Constructs a new SRect

Parameter
Type
Description

newRect=Rect.New(0,0,150,150)

Properties

X

float X get set

Property Description

newRect=Rect.New(0,0,150,150)
newRect.X = 10.0

Y

float Y get set

Property Description

newRect=Rect.New(0,0,150,150)
newRect.Y = 10.0

Width

float Width get set

Property Description

newRect=Rect.New(0,0,150,150)
newRect.Width = 10.0

Height

float Height get set

Property Description

newRect=Rect.New(0,0,150,150)
newRect.Height = 10.0

Position

The X and Y position of the rectangle.

newRect=Rect.New(50,50,150,150)
positionVector = newRect.position

Center

The position of the center of the rectangle.

newRect = Rect.New(50,50,150,150)
VectorCenter = newRect.Center

Min

The position of the minimum corner of the rectangle.

newRect=Rect.New(0,0,150,150)
vectorMin = newRect.Min

Max

The position of the maximum corner of the rectangle.

newRect=Rect.New(0,0,150,150)
vectorMax = newRect.Max

Size

The width and height of the rectangle.

newRect=Rect.New(0,0,150,150)
vectorSize = newRect.Size

XMin

float XMin get

The minimum X coordinate of the rectangle.

newRect=Rect.New(0,0,150,150)
floatXMin = newRect.XMin

YMin

float YMin get

The minimum Y coordinate of the rectangle.

newRect=Rect.New(0,0,150,150)
floatYMin = newRect.YMin

XMax

float XMax get

The maximum Y coordinate of the rectangle.

newRect=Rect.New(0,0,150,150)
floatXMax = newRect.XMax

YMax

float YMax get

The maximum Y coordinate of the rectangle.

newRect=Rect.New(0,0,150,150)
floatYMax = newRect.YMax

Left

float Left get

Property Description

newRect=Rect.New(0,0,150,150)
floatLeft = newRect.Left

Right

float Right get

Property Description

newRect=Rect.New(0,0,150,150)
floatRight = newRect.Right

Top

float Top get

Property Description

newRect=Rect.New(0,0,150,150)
floatTop = newRect.Top

Bottom

float Bottom get

Property Description

newRect=Rect.New(0,0,150,150)
floatBottom = newRect.Bottom
PreviousSRayNextSResource

Last updated 2 years ago

Was this helpful?

bool (SVector point) bool (SVector point, bool allowInverse)

bool (SRect other) bool (SRect other, bool allowInverse)

bool (SRect other)

string (string format) string ()

static SRect (float x, float y, float width, float height)

float get set

float get set

float get set

float get set

SVector get

SVector get

SVector get

SVector get

SVector get

float get

float get

float get

float get

float get

float get

float get

float get

bool Contains ( point) bool Contains ( point, bool allowInverse)

Position get

Center get

Min get

Max get

Size get

SVector
SVector
SVector
SVector
SVector
SVector
SVector
Contains
Contains
Overlaps
Overlaps
Equals
ToString
ToString
New
X
Y
Width
Height
Position
Center
Min
Max
Size
XMin
YMin
XMax
YMax
Left
Right
Top
Bottom