XLE
v0.02.0
|
Resolves ray and box intersections for tools More...
#include <IntersectionTest.h>
Classes | |
class | Result |
struct | Type |
Public Member Functions | |
Result | FirstRayIntersection (const IntersectionTestContext &context, std::pair< Float3, Float3 > worldSpaceRay, Type::BitField filter=~Type::BitField(0)) const |
std::vector< Result > | FrustumIntersection (const IntersectionTestContext &context, const Float4x4 &worldToProjection, Type::BitField filter=~Type::BitField(0)) const |
Result | UnderCursor (const IntersectionTestContext &context, Int2 cursorPosition, Type::BitField filter=~Type::BitField(0)) const |
const std::shared_ptr< TerrainManager > & | GetTerrain () const |
IntersectionTestScene (std::shared_ptr< TerrainManager > terrainManager=nullptr, std::shared_ptr< PlacementsEditor > placements=nullptr, std::initializer_list< std::shared_ptr< IIntersectionTester >> extraTesters=std::initializer_list< std::shared_ptr< IIntersectionTester >>()) | |
Protected Attributes | |
std::shared_ptr< TerrainManager > | _terrainManager |
std::shared_ptr< PlacementsEditor > | _placements |
std::vector< std::shared_ptr< IIntersectionTester > > | _extraTesters |
Resolves ray and box intersections for tools
This object can calculate intersections of basic primitives against the scene. This is intended for tools to perform interactive operations (like selecting objects in the scene). Note that much of the intersection math is performed on the GPU. This means that any intersection operation will probably involve a GPU synchronisation. This isn't intended to be used at runtime in a game, because it may cause frame-rate hitches. But for tools, it should not be an issue.