Show / Hide Table of Contents

Class ElementExtensions

Extensions for clientsided elements

Inheritance
Object
ElementExtensions
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Client.Elements
Assembly: SlipeClient.dll
Syntax
public static class ElementExtensions

Methods

| Improve this Doc View Source

GetBoundingBox(PhysicalElement)

This function returns the minimum and maximum relative coordinates of an element's bounding box.

Declaration
public static Tuple<Vector3, Vector3> GetBoundingBox(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Tuple<Vector3, Vector3>
| Improve this Doc View Source

GetDistanceFromCentreOfMassToBaseOfModel(PhysicalElement)

his function is used to retrieve the distance between a element's centre of mass to the base of the model. This can be used to calculate the position the element has to be set to, to have it on ground level.

Declaration
public static float GetDistanceFromCentreOfMassToBaseOfModel(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Single
| Improve this Doc View Source

GetRadius(PhysicalElement)

his function gets the radius of an element. Normally, sphere or circle-shaped elements tend to return a more accurate and expected radius than others with another shapes.

Declaration
public static float GetRadius(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Single
| Improve this Doc View Source

IsCollidableWith(PhysicalElement, PhysicalElement)

This function can be used to check whether specified element is collidable with another element.

Declaration
public static bool IsCollidableWith(this PhysicalElement e, PhysicalElement collideWith)
Parameters
Type Name Description
PhysicalElement e
PhysicalElement collideWith
Returns
Type Description
Boolean
| Improve this Doc View Source

IsLocal(PhysicalElement)

This function checks whether this element is local to the client (doesn't exist in the server) or not.

Declaration
public static bool IsLocal(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Boolean
| Improve this Doc View Source

IsOnScreen(PhysicalElement)

This function will check if this element is on the screen. Elements behind objects but still in the camera view count as being on screen.

Declaration
public static bool IsOnScreen(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Boolean
| Improve this Doc View Source

IsStreamable(PhysicalElement)

Check if this element is streamable

Declaration
public static bool IsStreamable(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Boolean
| Improve this Doc View Source

IsStreamedIn(PhysicalElement)

This function checks whether this element is currently streamed in (not virtualized) and are actual GTA objects in the world.

Declaration
public static bool IsStreamedIn(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Boolean
| Improve this Doc View Source

IsSyncer(PhysicalElement)

This function checks whether this element is synced by the local player or not.

Declaration
public static bool IsSyncer(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Boolean
| Improve this Doc View Source

IsWaitingForGroundToLoad(PhysicalElement)

This function checks whether MTA has frozen an element because it is above map objects which are still loading or not.

Declaration
public static bool IsWaitingForGroundToLoad(this PhysicalElement e)
Parameters
Type Name Description
PhysicalElement e
Returns
Type Description
Boolean
| Improve this Doc View Source

SetCollidableWith(PhysicalElement, PhysicalElement, Boolean)

This function can be used to set an element to collide with another element. An element with collisions disabled does not interact physically with the other element.

Declaration
public static bool SetCollidableWith(this PhysicalElement e, PhysicalElement collideWith, bool enabled)
Parameters
Type Name Description
PhysicalElement e
PhysicalElement collideWith
Boolean enabled
Returns
Type Description
Boolean
| Improve this Doc View Source

SetStreamable(PhysicalElement, Boolean)

This function can be used to disable streaming for this element. This will make sure the element is not virtualized (streamed out from GTA) when the player moves far away from it.

Declaration
public static bool SetStreamable(this PhysicalElement e, bool enabled)
Parameters
Type Name Description
PhysicalElement e
Boolean enabled
Returns
Type Description
Boolean
  • Improve this Doc
  • View Source
Back to top Generated by DocFX