Stellarium 0.13.2
List of all members | Public Member Functions | Protected Member Functions
StelProjectorFisheye Class Reference

Public Member Functions

 StelProjectorFisheye (ModelViewTranformP func)
 
virtual QString getNameI18 () const
 Get a human-readable name for this projection type. More...
 
virtual QString getDescriptionI18 () const
 Get a human-readable short description for this projection type. More...
 
virtual float getMaxFov () const
 Get the maximum FOV apperture in degree. More...
 
bool forward (Vec3f &v) const
 Apply the transformation in the forward direction in place. More...
 
bool backward (Vec3d &v) const
 Apply the transformation in the backward projection in place. More...
 
float fovToViewScalingFactor (float fov) const
 Convert a Field Of View radius value in radians in ViewScalingFactor (used internally) More...
 
float viewScalingFactorToFov (float vsf) const
 Convert a ViewScalingFactor value (used internally) in Field Of View radius in radians. More...
 
float deltaZoom (float fov) const
 Return the small zoom increment to use at the given FOV for nice movements. More...
 
- Public Member Functions inherited from StelProjector
virtual ~StelProjector ()
 Destructor. More...
 
QString getHtmlSummary () const
 Get a HTML version of the short description for this projection type. More...
 
bool intersectViewportDiscontinuity (const Vec3d &p1, const Vec3d &p2) const
 Determine whether a great circle connection p1 and p2 intersects with a projection discontinuity. More...
 
bool intersectViewportDiscontinuity (const SphericalCap &cap) const
 
bool getFlagGravityLabels () const
 Get the current state of the flag which decides whether to arrage labels so that they are aligned with the bottom of a 2d screen, or a 3d dome. More...
 
const Vec4igetViewport () const
 Get the lower left corner of the viewport and the width, height. More...
 
Vec2f getViewportCenter () const
 Get the center of the viewport relative to the lower left corner of the screen. More...
 
int getViewportPosX () const
 Get the horizontal viewport offset in pixels. More...
 
int getViewportPosY () const
 Get the vertical viewport offset in pixels. More...
 
int getViewportWidth () const
 Get the viewport width in pixels. More...
 
int getViewportHeight () const
 Get the viewport height in pixels. More...
 
float getDevicePixelsPerPixel () const
 Get the number of device pixels per "Device Independent Pixels" (value is usually 1, but 2 for mac retina screens). More...
 
SphericalRegionP getViewportConvexPolygon (float marginX=0., float marginY=0.) const
 Return a convex polygon on the sphere which includes the viewport in the current frame. More...
 
const SphericalCapgetBoundingCap () const
 Return a SphericalCap containing the whole viewport. More...
 
float getPixelPerRadAtCenter () const
 Get size of a radian in pixels at the center of the viewport disk. More...
 
float getFov () const
 Get the current FOV diameter in degrees. More...
 
bool needGlFrontFaceCW () const
 Get whether front faces need to be oriented in the clockwise direction. More...
 
bool checkInViewport (const Vec3d &pos) const
 Check to see if a 2d position is inside the viewport. More...
 
bool checkInViewport (const Vec3f &pos) const
 Check to see if a 2d position is inside the viewport. More...
 
Vec3d viewPortIntersect (const Vec3d &p1, const Vec3d &p2) const
 Return the position where the 2 2D point p1 and p2 cross the viewport edge P1 must be inside the viewport and P2 outside (check with checkInViewport() before calling this method) More...
 
bool project (const Vec3d &v, Vec3d &win) const
 Project the vector v from the current frame into the viewport. More...
 
bool project (const Vec3f &v, Vec3f &win) const
 Project the vector v from the current frame into the viewport. More...
 
virtual void project (int n, const Vec3d *in, Vec3f *out)
 
virtual void project (int n, const Vec3f *in, Vec3f *out)
 
bool projectInPlace (Vec3d &vd) const
 Project the vector v from the current frame into the viewport. More...
 
bool projectInPlace (Vec3f &v) const
 Project the vector v from the current frame into the viewport. More...
 
bool projectCheck (const Vec3d &v, Vec3d &win) const
 Project the vector v from the current frame into the viewport. More...
 
bool projectCheck (const Vec3f &v, Vec3f &win) const
 Project the vector v from the current frame into the viewport. More...
 
bool unProject (const Vec3d &win, Vec3d &v) const
 Project the vector v from the viewport frame into the current frame. More...
 
bool unProject (double x, double y, Vec3d &v) const
 
bool projectLineCheck (const Vec3d &v1, Vec3d &win1, const Vec3d &v2, Vec3d &win2) const
 Project the vectors v1 and v2 from the current frame into the viewport. More...
 
ModelViewTranformP getModelViewTransform () const
 Get the current model view matrix. More...
 
Mat4f getProjectionMatrix () const
 Get the current projection matrix. More...
 
StelProjectorMaskType getMaskType (void) const
 Get the current type of the mask if any. More...
 

Protected Member Functions

virtual bool hasDiscontinuity () const
 Return whether the projection presents discontinuities. Used for optimization. More...
 
virtual bool intersectViewportDiscontinuityInternal (const Vec3d &, const Vec3d &) const
 Determine whether a great circle connection p1 and p2 intersects with a projection discontinuity. More...
 
virtual bool intersectViewportDiscontinuityInternal (const Vec3d &, double) const
 Determine whether a cap intersects with a projection discontinuity. More...
 
- Protected Member Functions inherited from StelProjector
 StelProjector (ModelViewTranformP amodelViewTransform)
 Private constructor. Only StelCore can create instances of StelProjector. More...
 
virtual void computeBoundingCap ()
 Initialize the bounding cap. More...
 

Additional Inherited Members

- Public Types inherited from StelProjector
enum  StelProjectorMaskType { MaskNone, MaskDisk }
 Define viewport mask types. More...
 
typedef QSharedPointer
< ModelViewTranform
ModelViewTranformP
 Shared pointer on a ModelViewTranform instance (implement reference counting) More...
 
- Static Public Member Functions inherited from StelProjector
static const QString maskTypeToString (StelProjectorMaskType type)
 Get a string description of a StelProjectorMaskType. More...
 
static StelProjectorMaskType stringToMaskType (const QString &s)
 Get a StelProjectorMaskType from a string description. More...
 
- Protected Attributes inherited from StelProjector
ModelViewTranformP modelViewTransform
 
float flipHorz
 
float flipVert
 
float pixelPerRad
 
StelProjectorMaskType maskType
 
float zNear
 
float oneOverZNearMinusZFar
 
Vec4i viewportXywh
 
Vec2f viewportCenter
 
float viewportFovDiameter
 
bool gravityLabels
 
float defautAngleForGravityText
 
SphericalCap boundingCap
 
float devicePixelsPerPixel
 

Detailed Description

Definition at line 139 of file StelProjectorClasses.hpp.

Member Function Documentation

bool StelProjectorFisheye::backward ( Vec3d v) const
virtual

Apply the transformation in the backward projection in place.

Implements StelProjector.

float StelProjectorFisheye::deltaZoom ( float  fov) const
virtual

Return the small zoom increment to use at the given FOV for nice movements.

Implements StelProjector.

bool StelProjectorFisheye::forward ( Vec3f v) const
inlinevirtual

Apply the transformation in the forward direction in place.

After transformation v[2] will always contain the length of the original v: sqrt(v[0]*v[0]+v[1]*v[1]+v[2]*v[2]) regardless of the projection type. This makes it possible to implement depth buffer testing in a way independent of the projection type. I would like to return the squared length instead of the length because of performance reasons. But then far away objects are not textured any more, perhaps because of a depth buffer overflow although the depth test is disabled?

Implements StelProjector.

Definition at line 146 of file StelProjectorClasses.hpp.

float StelProjectorFisheye::fovToViewScalingFactor ( float  fov) const
virtual

Convert a Field Of View radius value in radians in ViewScalingFactor (used internally)

Implements StelProjector.

virtual QString StelProjectorFisheye::getDescriptionI18 ( ) const
virtual

Get a human-readable short description for this projection type.

Reimplemented from StelProjector.

virtual float StelProjectorFisheye::getMaxFov ( ) const
inlinevirtual

Get the maximum FOV apperture in degree.

Implements StelProjector.

Definition at line 145 of file StelProjectorClasses.hpp.

virtual QString StelProjectorFisheye::getNameI18 ( ) const
virtual

Get a human-readable name for this projection type.

Implements StelProjector.

virtual bool StelProjectorFisheye::hasDiscontinuity ( ) const
inlineprotectedvirtual

Return whether the projection presents discontinuities. Used for optimization.

Implements StelProjector.

Definition at line 173 of file StelProjectorClasses.hpp.

virtual bool StelProjectorFisheye::intersectViewportDiscontinuityInternal ( const Vec3d p1,
const Vec3d p2 
) const
inlineprotectedvirtual

Determine whether a great circle connection p1 and p2 intersects with a projection discontinuity.

For many projections without discontinuity, this should return always false, but for other like cylindrical projection it will return true if the line cuts the wrap-around line (i.e. at lon=180 if the observer look at lon=0).

Implements StelProjector.

Definition at line 174 of file StelProjectorClasses.hpp.

virtual bool StelProjectorFisheye::intersectViewportDiscontinuityInternal ( const Vec3d capN,
double  capD 
) const
inlineprotectedvirtual

Determine whether a cap intersects with a projection discontinuity.

Implements StelProjector.

Definition at line 175 of file StelProjectorClasses.hpp.

float StelProjectorFisheye::viewScalingFactorToFov ( float  vsf) const
virtual

Convert a ViewScalingFactor value (used internally) in Field Of View radius in radians.

Implements StelProjector.


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