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

Context for doing ray & box intersection test More...

#include <IntersectionTest.h>

Public Member Functions

std::pair< Float3, Float3 > CalculateWorldSpaceRay (Int2 screenCoord) const
 
Float2 ProjectToScreenSpace (const Float3 &worldSpaceCoord) const
 
RenderCore::Techniques::CameraDesc GetCameraDesc () const
 
ISceneParserGetSceneParser () const
 
UInt2 GetViewportSize () const
 
const RenderCore::Techniques::TechniqueContextGetTechniqueContext () const
 
const std::shared_ptr< RenderCore::IThreadContext > & GetThreadContext () const
 
 IntersectionTestContext (std::shared_ptr< RenderCore::IThreadContext > threadContext, const RenderCore::Techniques::CameraDesc &cameraDesc, std::shared_ptr< RenderCore::ViewportContext > viewportContext, std::shared_ptr< RenderCore::Techniques::TechniqueContext > techniqueContext)
 
 IntersectionTestContext (std::shared_ptr< RenderCore::IThreadContext > threadContext, std::shared_ptr< SceneEngine::ISceneParser > sceneParser, std::shared_ptr< RenderCore::ViewportContext > viewportContext, std::shared_ptr< RenderCore::Techniques::TechniqueContext > techniqueContext)
 

Static Public Member Functions

static std::pair< Float3, Float3 > CalculateWorldSpaceRay (const RenderCore::Techniques::CameraDesc &sceneCamera, Int2 screenCoord, UInt2 viewportDimes)
 

Protected Attributes

std::shared_ptr< RenderCore::IThreadContext_threadContext
 
std::shared_ptr< ISceneParser_sceneParser
 
std::shared_ptr< RenderCore::ViewportContext_viewportContext
 
RenderCore::Techniques::CameraDesc _cameraDesc
 
std::shared_ptr< RenderCore::Techniques::TechniqueContext_techniqueContext
 

Detailed Description

Context for doing ray & box intersection test

This context is intended for performing ray intersections for tools. Frequently we need to do "hit tests" and various projection and unprojection operations. This context contains the minimal references to do this. Note that we need some camera information for LOD calculations. We could assume everything is at top LOD; but we will get a better match with the rendered result if we take into account LOD. We even need viewport size – because this can effect LOD as well. It's frustrating, but all this is required!

See also
IntersectionResolver

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