XLE
v0.02.0
|
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 |
ISceneParser * | GetSceneParser () const |
UInt2 | GetViewportSize () const |
const RenderCore::Techniques::TechniqueContext & | GetTechniqueContext () 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 |
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!