|
DXHitTestOptions Class |
DXHitTestOptions class specifies hit testing parameters that are used with DXScene's hit testing.
Inheritance Hierarchy SystemObject
Ab3d.DirectXDXHitTestOptions
Namespace: Ab3d.DirectXAssembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax public class DXHitTestOptions
The DXHitTestOptions type exposes the following members.
Constructors Properties | Name | Description |
---|
| BackgroundRenderingQueue |
When BackgroundRenderingQueue is specified, then the objects that are assigned to that rendering queue will be considered farther from the camera than objects from other rendering queues.
This means that GetClosestHitObject(Ray, SceneNode) will return objects from any other rendering queue if they exist before returning objects from the specified rendering queue.
|
| GenerateOctTreeOnMeshInitialization |
When true and when mesh has more positions than MeshPositionsCountForOctTreeGeneration, then the OctTree is generated at mesh initialization time.
When false and when mesh has more positions than MeshPositionsCountForOctTreeGeneration, then the OctTree is generated when first HitTest method is called on the mesh.
Default value is false.
|
| GetOnlyFrontFacingTriangles |
When true then only triangles that have normals (calculated from triangle positions) oriented in the opposite direction as the ray are returned (because ray is usually created from the camera's position this returns only triangles that are facing the camera).
When false (by default), all hit triangles are returned regardless of their orientation.
|
| GetOnlyOneHitPerSceneNode |
When true then only one hit result is get from one SceneNode.
When false (by default), then multiple hit results can be created by one SceneNode.
This property is used only by the GetAllHitObjects(Ray, SceneNode) method and not by GetClosestHitObject(Ray, SceneNode) method.
|
| MeshPositionsCountForOctTreeGeneration |
Gets or sets an integer value that specifies number of positions in a mesh (DXMeshGeometry3D) at which a OctTree is generated to speed up hit testing
(e.g. if mesh has more positions then a value specified with this property, then OctTree will be generated for the mesh).
Default value is 512.
|
| OctTreeExpandChildBoundingBoxes |
ExpandChildBoundingBoxes is a float that defined how much the bounding boxes of node overlap.
By default the value is set to 0.2 - so each bounding box is extended for 20% (but it does not go out of the parent's bounding box).
This way the triangles that lay on node borders will be put into the child nodes instead of having them in the parent node (there we need to do a hit test every time).
|
| OctTreeMaxNodeLevel |
Number of levels used for OctTree - bigger number reduces the number of triangles in each node but increased the OctTree initialization time and used memory. Default value is 4.
|
| OverlayRenderingQueue |
When OverlayRenderingQueue is specified, then the objects that are assigned to that rendering queue will be considered closer to the camera than objects from other rendering queues.
This means that GetClosestHitObject(Ray, SceneNode) will return objects from the specified rendering queue even if in 3D space they are behind objects from other rendering queues.
|
| ReportAllHitTrianglesWhenEdgeIsHit |
When an edge of a triangle is hit, then by default (ReportAllHitTrianglesWhenEdgeIsHit is false) only one hit result is generated.
But when ReportAllHitTrianglesWhenEdgeIsHit is true, then two hit results will be reported when two triangles share the same edge.
|
| UseMultiThreading |
When true then multi-threaded hit testing algorithms are used when possible.
|
TopMethods | Name | Description |
---|
| Clone |
Returns a cloned version of this DXHitTestOptions.
|
| Equals | Determines whether the specified object is equal to the current object. (Overrides ObjectEquals(Object)) |
| GetHashCode | Serves as the default hash function. (Overrides ObjectGetHashCode) |
TopFields | Name | Description |
---|
| HitTestFilterCallback |
When HitTestFilterCallback is specified, the specified predicate is used as a filter that specifies if hit testing is executed on the specified SceneNode and its child SceneNodes (returns true) or not (returns false).
When HitTestFilterCallback is null, hit testing is executed on all SceneNodes (as the predicate would always return true).
|
TopSee Also