Class LazyAttachableObject
Abstract class that implements attaching functionality in a lazy way (updates only when update is called)
Inherited Members
Namespace: Slipe.Client.Helpers
Assembly: SlipeClient.dll
Syntax
public abstract class LazyAttachableObject
Fields
| Improve this Doc View SourcetoAttached
Declaration
protected PhysicalElement toAttached
Field Value
| Type | Description |
|---|---|
| PhysicalElement |
Properties
| Improve this Doc View SourceIsAttached
Get if this attachable is attached to a ToAttachable
Declaration
public bool IsAttached { get; }
Property Value
| Type | Description |
|---|---|
| Boolean |
Offset
A matrix describing the offset with which this attachable is attached
Declaration
public Matrix4x4 Offset { get; set; }
Property Value
| Type | Description |
|---|---|
| Matrix4x4 |
ToAttached
Get the Physical Element to which this attachable is attached
Declaration
public PhysicalElement ToAttached { get; }
Property Value
| Type | Description |
|---|---|
| PhysicalElement |
Methods
| Improve this Doc View SourceAttachTo(PhysicalElement)
Attach this attachable to a toAttachable without any offset
Declaration
public void AttachTo(PhysicalElement toElement)
Parameters
| Type | Name | Description |
|---|---|---|
| PhysicalElement | toElement |
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 |
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 |
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 |
Detach()
Detach this attachable
Declaration
public void Detach()
OnAttach()
Declaration
protected virtual void OnAttach()
OnDetach()
Declaration
protected virtual void OnDetach()
Update(RootElement, OnUpdateEventArgs)
Updates this element to the correct position and rotation
Declaration
protected abstract void Update(RootElement source, OnUpdateEventArgs eventArgs)
Parameters
| Type | Name | Description |
|---|---|---|
| RootElement | source | |
| OnUpdateEventArgs | eventArgs |