XLE  v0.02.0
Classes | Public Member Functions | Protected Attributes | List of all members
SceneEngine::IntersectionTestScene Class Reference

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< ResultFrustumIntersection (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
 

Detailed Description

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.


The documentation for this class was generated from the following files: