public float GetDistance2() { if (_target0 != null && _target1 != null) { return(ViVector3.Distance2(_target0.Value, _target1.Value)); } else { return(0.0f); } }
public bool IsIn() { if (_target0 != null && _target1 != null) { return(ViVector3.Distance2(_target0.Value, _target1.Value) < _range2); } else { return(false); } }
// private void _Update() { ViDebuger.AssertError(_target0 != null && _target1 != null); if (ViVector3.Distance2(_target0.Value, _target1.Value) < _range2) { _node.Detach(); if (_delegate != null) { _delegate(); } } }
private void _UpdateInside() { ViDebuger.AssertError(_target0 != null && _target1 != null); if (ViVector3.Distance2(_target0.Value, _target1.Value) > _range2) { _listWaitingOutor.PushBack(_node); if (_delegateOut != null) { _delegateOut(); } } }
public static State GetState(ViDistNotifierInterface notifier) { if (notifier._target0 == null || notifier._target1 == null) { return(State.NONE); } float distance2 = ViVector3.Distance2(notifier._target0.Value, notifier._target1.Value); if (distance2 < notifier._range2) { return(State.INSIDE); } else { return(State.OUTSIDE); } }
public void AttachUpdate(Callback deleIn, Callback deleOut) { if (_target0 == null || _target1 == null) { return; } _node.Data = this; _delegateIn = deleIn; _delegateOut = deleOut; float distance2 = ViVector3.Distance2(_target0.Value, _target1.Value); if (distance2 < _range2) { _listInner.PushBack(_node); } else { _listOutor.PushBack(_node); } }
public bool IsIn(ref ViVector3 pos) { return(_range2 >= ViVector3.Distance2(_rootPos, pos)); }