Hit |
public abstract class HitTestResult
The HitTestResult type exposes the following members.
Name | Description | |
---|---|---|
HitTestResult | Constructor | |
HitTestResult(SceneNode) | Constructor |
Name | Description | |
---|---|---|
IsSameObject | Returns true when the other HitTestResult represents the same object. When false is returned then new MouseLeave and MouseEnter events will be triggered. |
Name | Description | |
---|---|---|
HitSceneNode | Hit SceneNode (can be null when no object was hit) |
HitTestResult is a base class for hit test results in SharpEngine.
The base class defines only HitSceneNode field.
The virtual IsSameObject(HitTestResult) should be overridden by derived classes to provide custom logic when MouseLeave and MouseEnter events should be triggered. By default this happens when the HitSceneNode is changed. But when one SceneNode can show multiple objects (for examples with objects instancing), then the custom IsSameObject method can trigger MouseLeave and MouseEnter events in case mouse moves to another part of the SceneNode (another object's instance).