Click or drag to resize
Ab4d.SharpEngine logo

HitTestResult Class

HitTestResult is a base class for hit test results in SharpEngine.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CommonHitTestResult
    Ab4d.SharpEngine.CommonRayHitTestResult

Namespace: Ab4d.SharpEngine.Common
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public abstract class HitTestResult

The HitTestResult type exposes the following members.

Constructors
 NameDescription
Protected methodHitTestResult Constructor
Protected methodHitTestResult(SceneNode) Constructor
Top
Methods
 NameDescription
Public methodIsSameObject Returns true when the other HitTestResult represents the same object. When false is returned then new MouseLeave and MouseEnter events will be triggered.
Top
Fields
 NameDescription
Public fieldHitSceneNode Hit SceneNode (can be null when no object was hit)
Top
Remarks

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).

See Also