Skip to main content Link Menu Expand (external link) Document Search Copy Copied

GRPLOneWayLever Public class

Description

The GRPLOneWayLever class is a subclass of GRPLLeverBase and provides functionality for one-way levers in a 3D environment. The class contains the LeverActivated and LeverStopped events for lever activation and lever stopping. Additionally, the class includes fields for debugging and drawing.

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph Rhinox.XR.Grapple.It
  Rhinox.XR.Grapple.It.GRPLOneWayLever[[GRPLOneWayLever]]
  Rhinox.XR.Grapple.It.GRPLLeverBase[[GRPLLeverBase]]
  class Rhinox.XR.Grapple.It.GRPLLeverBase abstractStyle;
  end
Rhinox.XR.Grapple.It.GRPLLeverBase --> Rhinox.XR.Grapple.It.GRPLOneWayLever

Members

Methods

Protected methods

Returns Name
float GetLeverRotation(Vector3 projectedPos)
Calculates the angle between the projected position of the joint and the original handle position.
void Initialize()
Initializes the initial handle position and rotation.
void OnDrawGizmos()
Draws the desired gizmos.

Public methods

Returns Name
bool CheckForInteraction(RhinoxJoint joint, RhinoxHand hand)
Checks if a joint and hand are interacting with the lever.
Returns true if the joint and hand are interacting with the lever, false otherwise.
bool TryGetCurrentInteractJoint(ICollection<RhinoxJoint> joints, out RhinoxJoint joint, RhinoxHand hand)

Details

Summary

The GRPLOneWayLever class is a subclass of GRPLLeverBase and provides functionality for one-way levers in a 3D environment. The class contains the LeverActivated and LeverStopped events for lever activation and lever stopping. Additionally, the class includes fields for debugging and drawing.

Inheritance

Constructors

GRPLOneWayLever

public GRPLOneWayLever()

Methods

GetLeverRotation

protected override float GetLeverRotation(Vector3 projectedPos)
Arguments
Type Name Description
Vector3 projectedPos The position of the projected joint on the plane defined by the lever.
Summary

Calculates the angle between the projected position of the joint and the original handle position.

Returns

Initialize

protected override void Initialize()
Summary

Initializes the initial handle position and rotation.

CheckForInteraction

public override bool CheckForInteraction(RhinoxJoint joint, RhinoxHand hand)
Arguments
Type Name Description
RhinoxJoint joint The interact joint
RhinoxHand hand The hand on which this joint resides
Summary

Checks if a joint and hand are interacting with the lever. Returns true if the joint and hand are interacting with the lever, false otherwise.

Returns

TryGetCurrentInteractJoint

public override bool TryGetCurrentInteractJoint(ICollection<RhinoxJoint> joints, out RhinoxJoint joint, RhinoxHand hand)
Arguments
Type Name Description
ICollection<RhinoxJoint> joints  
out RhinoxJoint joint  
RhinoxHand hand  

OnDrawGizmos

protected override void OnDrawGizmos()
Summary

Draws the desired gizmos.

Events

LeverActivated

public event Action<GRPLOneWayLever> LeverActivated
Summary

Triggered when the lever is activated.

LeverStopped

public event Action<GRPLOneWayLever> LeverStopped
Summary

Triggered when the lever is stopped.

Generated with ModularDoc