Show / Hide Table of Contents

Class PhysicalElement

Represents a physical element in the GTA world

Inheritance
Object
Element
PhysicalElement
CollisionShape
SharedWater
SharedWorldObject
SharedMarker
SharedPed
SharedPickup
SharedBlip
SharedRadarArea
SharedVehicle
Inherited Members
Element.element
Element.Root
Element.MTAElement
Element.Type
Element.ID
Element.Exists
Element.ChildCount
Element.Parent
Element.CallPropagationEnabled
Element.SetData(String, Object, Boolean)
Element.GetData(String, Boolean)
Element.TryGetData(String, Object, Boolean)
Element.GetData<T>(String, Boolean)
Element.TryGetData<T>(String, T, Boolean)
Element.Destroy()
Element.GetChild(Int32)
Element.GetChildren(String)
Element.GetByID(String, Int32)
Element.ListenForEvent(String, Boolean, String)
Element.HandleEvent(String, MtaElement, Object, Object, Object, Object, Object, Object, Object, Object)
Element.OnDestroy
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Slipe.Shared.Elements
Assembly: SlipeShared.dll
Syntax
public abstract class PhysicalElement : Element

Properties

| Improve this Doc View Source

Alpha

Gets and sets the alpha value of this element

Declaration
public int Alpha { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

AngularQuaternionVelocity

Gets and sets the angular velocity of the element in quaternions

Declaration
public Quaternion AngularQuaternionVelocity { get; set; }
Property Value
Type Description
Quaternion
| Improve this Doc View Source

AngularVelocity

Gets and sets the current angular velocity of a specified, supported element.

Declaration
public Vector3 AngularVelocity { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

CollisionsEnabled

Get and set if this element is set to have collisions disabled. An element without collisions does not interact with the physical environment and remains static.

Declaration
public bool CollisionsEnabled { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

CollisionShape

Gets the collision shape of this element. (Only applicable to some)

Declaration
public CollisionShape CollisionShape { get; }
Property Value
Type Description
CollisionShape
| Improve this Doc View Source

Dimension

Gets and sets the dimension of this element

Declaration
public int Dimension { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

DoubleSided

Get or set if this element is double sided

Declaration
public bool DoubleSided { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

ForwardVector

Gets the vector that represents forward for the element

Declaration
public Vector3 ForwardVector { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

Frozen

Gets and sets if this element is frozen in place

Declaration
public bool Frozen { get; set; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

Health

Gets and sets the health of this element

Declaration
public float Health { get; set; }
Property Value
Type Description
Single
| Improve this Doc View Source

Interior

Gets and sets the interior of this element

Declaration
public int Interior { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

IsAttached

Get if this attachable is attached to a physical element

Declaration
public bool IsAttached { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsInWater

Get if an element is submerged in water

Declaration
public bool IsInWater { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

IsLowLOD

Get if this is a Low LOD element

Declaration
public bool IsLowLOD { get; }
Property Value
Type Description
Boolean
| Improve this Doc View Source

LowLODElement

Get and set the associated LOW LOD element

Declaration
public PhysicalElement LowLODElement { get; set; }
Property Value
Type Description
PhysicalElement
| Improve this Doc View Source

Matrix

Gets and sets the position,rotation,scale matrix of the element

Declaration
public Matrix4x4 Matrix { get; set; }
Property Value
Type Description
Matrix4x4
| Improve this Doc View Source

Model

Gets and sets the model of this element

Declaration
public virtual int Model { get; set; }
Property Value
Type Description
Int32
| Improve this Doc View Source

Offset

A matrix describing the offset with which this attachable is attached

Declaration
public Matrix4x4 Offset { get; set; }
Property Value
Type Description
Matrix4x4
| Improve this Doc View Source

Position

Gets and sets the position of the element

Declaration
public Vector3 Position { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

QuaternionRotation

Gets and sets the rotation of the element in quaternions

Declaration
public Quaternion QuaternionRotation { get; set; }
Property Value
Type Description
Quaternion
| Improve this Doc View Source

RightVector

Gets the vector that represents right for the element

Declaration
public Vector3 RightVector { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

Rotation

Gets and sets the rotation of the element in Euler angles

Declaration
public Vector3 Rotation { get; set; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

ToAttached

Get the element to which this attachable is attached

Declaration
public PhysicalElement ToAttached { get; }
Property Value
Type Description
PhysicalElement
| Improve this Doc View Source

UpVector

Gets the vector that represents up for the element

Declaration
public Vector3 UpVector { get; }
Property Value
Type Description
Vector3
| Improve this Doc View Source

Velocity

Gets and sets the velocity of this element

Declaration
public Vector3 Velocity { get; set; }
Property Value
Type Description
Vector3

Methods

| Improve this Doc View Source

AttachTo(PhysicalElement)

Attach this attachable to a toAttachable without any offset

Declaration
public void AttachTo(PhysicalElement toElement)
Parameters
Type Name Description
PhysicalElement toElement
| Improve this Doc View Source

AttachTo(PhysicalElement, Matrix4x4)

Attach this attachable to a toAttachable using a matrix to describe the positional and rotational offset

Declaration
public void AttachTo(PhysicalElement toElement, Matrix4x4 offsetMatrix)
Parameters
Type Name Description
PhysicalElement toElement
Matrix4x4 offsetMatrix
| Improve this Doc View Source

AttachTo(PhysicalElement, Vector3, Quaternion)

Attach this attachable to a toAttachable with a vector describing the position offset and a quaternion describing the rotation offset

Declaration
public void AttachTo(PhysicalElement toElement, Vector3 positionOffset, Quaternion rotationOffset)
Parameters
Type Name Description
PhysicalElement toElement
Vector3 positionOffset
Quaternion rotationOffset
| Improve this Doc View Source

AttachTo(PhysicalElement, Vector3, Vector3)

Attach this attachable to a toAttachable with 2 vectors describing a position offset and a rotation offset

Declaration
public void AttachTo(PhysicalElement toElement, Vector3 positionOffset, Vector3 rotationOffset)
Parameters
Type Name Description
PhysicalElement toElement
Vector3 positionOffset
Vector3 rotationOffset
| Improve this Doc View Source

Detach()

Detach this attachable

Declaration
public void Detach()
| Improve this Doc View Source

FaceElement(PhysicalElement)

Make this element face another element

Declaration
public virtual void FaceElement(PhysicalElement target)
Parameters
Type Name Description
PhysicalElement target

The element to face

| Improve this Doc View Source

GetWithinRange(Vector3, Single, String)

This function is used to retrieve an array of all elements of specified type within a range of 3D coordinates.

Declaration
public static PhysicalElement[] GetWithinRange(Vector3 position, float range, string type = "")
Parameters
Type Name Description
Vector3 position
Single range
String type
Returns
Type Description
PhysicalElement[]
| Improve this Doc View Source

IsWithinCollisionShape(CollisionShape)

This function is used to determine if an element is within a collision shape Please note that this function doesn't verify whether element is in the same dimension and interior, additional checks could be implemented manually if they are needed.

Declaration
public bool IsWithinCollisionShape(CollisionShape collisionShape)
Parameters
Type Name Description
CollisionShape collisionShape
Returns
Type Description
Boolean
| Improve this Doc View Source

IsWithinMarker(SharedMarker)

This function is used to determine if this element is within a marker.

Declaration
public bool IsWithinMarker(SharedMarker marker)
Parameters
Type Name Description
SharedMarker marker
Returns
Type Description
Boolean

Events

| Improve this Doc View Source

OnClicked

Declaration
public event PhysicalElement.OnClickedHandler OnClicked
Event Type
Type Description
PhysicalElement.OnClickedHandler
| Improve this Doc View Source

OnModelChange

Declaration
public event PhysicalElement.OnModelChangeHandler OnModelChange
Event Type
Type Description
PhysicalElement.OnModelChangeHandler
| Improve this Doc View Source

OnStartSync

Declaration
public event PhysicalElement.OnStartSyncHandler OnStartSync
Event Type
Type Description
PhysicalElement.OnStartSyncHandler
| Improve this Doc View Source

OnStopSync

Declaration
public event PhysicalElement.OnStopSyncHandler OnStopSync
Event Type
Type Description
PhysicalElement.OnStopSyncHandler
| Improve this Doc View Source

OnStreamIn

Declaration
public event PhysicalElement.OnStreamInHandler OnStreamIn
Event Type
Type Description
PhysicalElement.OnStreamInHandler
| Improve this Doc View Source

OnStreamOut

Declaration
public event PhysicalElement.OnStreamOutHandler OnStreamOut
Event Type
Type Description
PhysicalElement.OnStreamOutHandler
  • Improve this Doc
  • View Source
Back to top Generated by DocFX