protected override void OnInteractionShapeCreated(INTERACTION_SHAPE_INSTANCE_HANDLE instanceHandle) { base.OnInteractionShapeCreated(instanceHandle); _solvedPosition = _rigidbody.position; _solvedRotation = _rigidbody.rotation; updateLayer(); }
public override sealed void NotifyInteractionShapeDestroyed() { _shapeInstanceHandle = new INTERACTION_SHAPE_INSTANCE_HANDLE(); _hasShapeInstanceHandle = false; _baseCallGuard.Begin("OnInteractionShapeDestroyed"); OnInteractionShapeDestroyed(); _baseCallGuard.AssertBaseCalled(); }
public override sealed void NotifyInteractionShapeCreated(INTERACTION_SHAPE_INSTANCE_HANDLE instanceHandle) { _shapeInstanceHandle = instanceHandle; _hasShapeInstanceHandle = true; _baseCallGuard.Begin("OnInteractionShapeCreated"); OnInteractionShapeCreated(instanceHandle); _baseCallGuard.AssertBaseCalled(); }
protected virtual void destroyInteractionShape(IInteractionBehaviour interactionBehaviour) { INTERACTION_SHAPE_INSTANCE_HANDLE instanceHandle = interactionBehaviour.ShapeInstanceHandle; _instanceHandleToBehaviour.Remove(instanceHandle); InteractionC.DestroyShapeInstance(ref _scene, ref instanceHandle); interactionBehaviour.NotifyInteractionShapeDestroyed(); }
protected virtual void createInteractionShape(IInteractionBehaviour interactionBehaviour) { INTERACTION_SHAPE_DESCRIPTION_HANDLE descriptionHandle = interactionBehaviour.ShapeDescriptionHandle; INTERACTION_SHAPE_INSTANCE_HANDLE instanceHandle = new INTERACTION_SHAPE_INSTANCE_HANDLE(); INTERACTION_CREATE_SHAPE_INFO createInfo; INTERACTION_TRANSFORM createTransform; interactionBehaviour.GetInteractionShapeCreationInfo(out createInfo, out createTransform); InteractionC.CreateShapeInstance(ref _scene, ref descriptionHandle, ref createTransform, ref createInfo, out instanceHandle); _instanceHandleToBehaviour[instanceHandle] = interactionBehaviour; interactionBehaviour.NotifyInteractionShapeCreated(instanceHandle); }
protected virtual void updateInteractionRepresentations() { var active = _activityManager.ActiveBehaviours; for (int i = 0; i < active.Count; i++) { IInteractionBehaviour interactionBehaviour = active[i]; try { INTERACTION_SHAPE_INSTANCE_HANDLE shapeInstanceHandle = interactionBehaviour.ShapeInstanceHandle; INTERACTION_UPDATE_SHAPE_INFO updateInfo; INTERACTION_TRANSFORM updateTransform; interactionBehaviour.GetInteractionShapeUpdateInfo(out updateInfo, out updateTransform); InteractionC.UpdateShapeInstance(ref _scene, ref updateTransform, ref updateInfo, ref shapeInstanceHandle); } catch (Exception e) { _activityManager.NotifyMisbehaving(interactionBehaviour); Debug.LogException(e); } } }
/// <summary> /// Called when the interaction shape associated with this InteractionBehaviour /// is created and added to the interaction scene. /// </summary> protected virtual void OnInteractionShapeCreated(INTERACTION_SHAPE_INSTANCE_HANDLE instanceHandle) { _baseCallGuard.NotifyBaseCalled("OnInteractionShapeCreated"); }
/// <summary> /// Called by InteractionManager when the interaction shape associated with this InteractionBehaviour /// is created and added to the interaction scene. /// </summary> public abstract void NotifyInteractionShapeCreated(INTERACTION_SHAPE_INSTANCE_HANDLE instanceHandle);
protected override void OnInteractionShapeCreated(INTERACTION_SHAPE_INSTANCE_HANDLE instanceHandle) { base.OnInteractionShapeCreated(instanceHandle); checkCallback(InteractionCallback.OnCreateInstance); }