FormIt C++ API  v23.0.0 (2023.0.0)
WSM::Utils::ICamera Class Referenceabstract

Description

ICamera is an interface supplied by the application to query the camera class ICamera.

#include <interfaces.h>

Public Member Functions

virtual ~ICamera ()
 
virtual void GetCameraTransform (WSM::Transf3d &aT) const =0
 Get the camera transform. More...
 
virtual WSM::UnitVector3d GetViewDirection ()=0
 Get the camera view direction. More...
 
virtual WSM::UnitVector3d GetViewUp ()=0
 Get the camera up direction. More...
 
virtual double GetDistanceToTarget () const =0
 GetDistanceToTarget returns the distance to the target. More...
 
virtual WSM::Point3d GetSceneMidPointInFrontOfCamera () const =0
 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) More...
 
virtual WSM::Line3d ScreenPositionToWorldRay (double x, double y)=0
 ScreenPositionToWorldRay takes a screen normalized position (x, y) and creates a line in world space. More...
 
virtual double ScreenSpacePickRayRadius (bool useHeight=false)=0
 Get the screen space pick radius based on the screen size. More...
 
virtual bool IsPerspective () const =0
 Returns true is the camera is perspective view. More...
 
virtual double FOV ()=0
 Get field of view. More...
 
virtual double NormalizedScreenDistanceToWorldDistance (double normalizedScreenDist, const WSM::Point3d &atPoint)=0
 Converts a normalized screen distance to a world distance at the given 3d point. More...
 
virtual WSM::Point2d WorldToNormalizedScreen (const WSM::Point3d &, bool *visible=nullptr) const =0
 Given a world position, WorldToNormalizedScreen returns the projected NormalizedScreen point. More...
 
virtual WSM::Point2d WorldToScreenPixel (const WSM::Point3d &aWorldPos, bool *visible, bool invertY) const =0
 Given a world position, WorldToScreenPixel returns the projected Screen point in device pixel coordinates. More...
 

Constructor & Destructor Documentation

virtual WSM::Utils::ICamera::~ICamera ( )
inlinevirtual

Member Function Documentation

virtual double WSM::Utils::ICamera::FOV ( )
pure virtual

Get field of view.

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)

virtual WSM::UnitVector3d WSM::Utils::ICamera::GetViewDirection ( )
pure virtual

Get the camera view direction.

virtual WSM::UnitVector3d WSM::Utils::ICamera::GetViewUp ( )
pure virtual

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: