ICamera is an interface supplied by the application to query the camera class ICamera.
#include <interfaces.h>
virtual WSM::Utils::ICamera::~ICamera |
( |
| ) |
|
|
inlinevirtual |
virtual double WSM::Utils::ICamera::FOV |
( |
| ) |
|
|
pure virtual |
virtual void WSM::Utils::ICamera::GetCameraTransform |
( |
WSM::Transf3d & |
aT | ) |
const |
|
pure virtual |
Get the camera transform.
virtual double WSM::Utils::ICamera::GetDistanceToTarget |
( |
| ) |
const |
|
pure virtual |
GetDistanceToTarget returns the distance to the target.
virtual WSM::Point3d WSM::Utils::ICamera::GetSceneMidPointInFrontOfCamera |
( |
| ) |
const |
|
pure virtual |
Get a point in front of the camera which is in the middle of the visible portion of the scene If there is no visible portion, get a point at a default distance (100 feet)
Get the camera view direction.
Get the camera up direction.
virtual bool WSM::Utils::ICamera::IsPerspective |
( |
| ) |
const |
|
pure virtual |
Returns true is the camera is perspective view.
virtual double WSM::Utils::ICamera::NormalizedScreenDistanceToWorldDistance |
( |
double |
normalizedScreenDist, |
|
|
const WSM::Point3d & |
atPoint |
|
) |
| |
|
pure virtual |
Converts a normalized screen distance to a world distance at the given 3d point.
virtual WSM::Line3d WSM::Utils::ICamera::ScreenPositionToWorldRay |
( |
double |
x, |
|
|
double |
y |
|
) |
| |
|
pure virtual |
ScreenPositionToWorldRay takes a screen normalized position (x, y) and creates a line in world space.
virtual double WSM::Utils::ICamera::ScreenSpacePickRayRadius |
( |
bool |
useHeight = false | ) |
|
|
pure virtual |
Get the screen space pick radius based on the screen size.
This is a normalized value. When useHeight is true it uses the vertical screen dimension in the algorithm. otherwise the horizontal screen dimension.
virtual WSM::Point2d WSM::Utils::ICamera::WorldToNormalizedScreen |
( |
const WSM::Point3d & |
, |
|
|
bool * |
visible = nullptr |
|
) |
| const |
|
pure virtual |
Given a world position, WorldToNormalizedScreen returns the projected NormalizedScreen point.
virtual WSM::Point2d WSM::Utils::ICamera::WorldToScreenPixel |
( |
const WSM::Point3d & |
aWorldPos, |
|
|
bool * |
visible, |
|
|
bool |
invertY |
|
) |
| const |
|
pure virtual |
Given a world position, WorldToScreenPixel returns the projected Screen point in device pixel coordinates.
If visible is passed in, it returns false if the point is outside the screen. If invertY is true, 0 y is considered at the top of the screen
The documentation for this class was generated from the following file: