gramods
Classes | Public Member Functions | Static Public Attributes | List of all members
gramods::gmGraphics::StereographicCoordinatesMapper Class Reference

Coordinates mapper that provides a stereographic mapping between 2D and 3D. More...

#include <StereographicCoordinatesMapper.hh>

Inheritance diagram for gramods::gmGraphics::StereographicCoordinatesMapper:
Inheritance graph
[legend]
Collaboration diagram for gramods::gmGraphics::StereographicCoordinatesMapper:
Collaboration graph
[legend]

Classes

struct  Impl
 

Public Member Functions

std::string getCommonCode () override
 
std::string getTo2DCode () override
 
std::string getTo3DCode () override
 
void setCommonUniforms (GLuint program) override
 
void setRadius (float R)
 Sets the radius of the stereographic sphere. More...
 
void setCoverageAngle (gmCore::angle a)
 Calculates and sets the radius of the stereographic sphere from the specified angle the projection from -1 to 1 should cover on the sphere. More...
 
void setTheta0 (gmCore::angle a)
 Sets the yaw, the horizontal heading, a value in the range 0 to 2π. More...
 
void setPhi0 (gmCore::angle a)
 Sets the pitch, the vertical heading, a value in the range -π/2 to π/2. More...
 
- Public Member Functions inherited from gramods::gmGraphics::CoordinatesMapper
virtual void setTo2DUniforms (GLuint program)
 Called by the code that is using this CoordinatesMapper object, to let it set the uniforms used by the to-2D code. More...
 
virtual void setTo3DUniforms (GLuint program)
 Called by the code that is using this CoordinatesMapper object, to let it set the uniforms used by the to-3D code. More...
 
virtual std::string getDefaultKey () override
 Returns the default key, in Configuration, for the Object. More...
 
- Public Member Functions inherited from gramods::gmCore::Object
 Object ()
 Initializes internal data. More...
 
virtual ~Object ()
 Cleaning up internal data. More...
 
virtual void initialize ()
 Called to initialize the Object. More...
 
virtual void accept (Visitor *visitor)
 Calls the visitors apply method with this as argument. More...
 
virtual void traverse (Visitor *visitor)
 Calls the child Object's accept method, if such exist. More...
 
bool isInitialized ()
 Returns true if the Object is initialized. More...
 

Static Public Attributes

static gramods::gmCore::OFactory::OFactoryInformation _gm_ofi
 

Additional Inherited Members

- Protected Member Functions inherited from gramods::gmGraphics::CoordinatesMapper
const std::string withVarId (std::string) const
 
- Protected Attributes inherited from gramods::gmGraphics::CoordinatesMapper
const std::string var_id
 

Detailed Description

Coordinates mapper that provides a stereographic mapping between 2D and 3D.

The stereographic projection is conformal. As such it preserves the angles at which curves cross each other, but on the other hand does not preserve area.

Member Function Documentation

◆ getCommonCode()

std::string gramods::gmGraphics::StereographicCoordinatesMapper::getCommonCode ( )
overridevirtual

◆ getTo2DCode()

std::string gramods::gmGraphics::StereographicCoordinatesMapper::getTo2DCode ( )
overridevirtual

◆ getTo3DCode()

std::string gramods::gmGraphics::StereographicCoordinatesMapper::getTo3DCode ( )
overridevirtual

◆ setCommonUniforms()

void gramods::gmGraphics::StereographicCoordinatesMapper::setCommonUniforms ( GLuint  program)
overridevirtual

◆ setCoverageAngle()

void gramods::gmGraphics::StereographicCoordinatesMapper::setCoverageAngle ( gmCore::angle  a)

Calculates and sets the radius of the stereographic sphere from the specified angle the projection from -1 to 1 should cover on the sphere.

Default is π.

XML-attribute: coverageAngle

◆ setPhi0()

void gramods::gmGraphics::StereographicCoordinatesMapper::setPhi0 ( gmCore::angle  a)

Sets the pitch, the vertical heading, a value in the range -π/2 to π/2.

Default is π/2.

XML-attribute: phi0

See also
operator>>(std::istream &, gmCore::angle &)

◆ setRadius()

void gramods::gmGraphics::StereographicCoordinatesMapper::setRadius ( float  R)

Sets the radius of the stereographic sphere.

In comparison, the 2D coordinates range from -1 to 1. Default is 0.5.

XML-attribute: radius

◆ setTheta0()

void gramods::gmGraphics::StereographicCoordinatesMapper::setTheta0 ( gmCore::angle  a)

Sets the yaw, the horizontal heading, a value in the range 0 to 2π.

Default is 0.

XML-attribute: theta0

See also
operator>>(std::istream &, gmCore::angle &)

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