i6engine  1.0
i6e::api::GraphicsFacade Class Reference

#include <D:/Projekte/i6engine/libs/i6engine-modules/include/i6engine/api/facades/GraphicsFacade.h>

Public Member Functions

 GraphicsFacade ()
 
 ~GraphicsFacade ()
 
void closeViewports ()
 closes all viewports of the scene More...
 
void setAmbientLight (double r, double g, double b)
 sets the color for the ambient light of the scene More...
 
void setSkyBox (const std::string &material, double distance=5000.0, bool renderFirst=true)
 adds a sky box to the world More...
 
void setSkyDome (const std::string &material, int32_t curvature=10, double tiles=8.0, double distance=4000.0, bool renderFirst=true)
 
void setSkyPlane (const std::string &material, double distance, int32_t direction, int32_t size=1000, double tiles=10.0, bool renderFirst=true, double curvature=0.0, int32_t xSegments=1, int32_t ySegments=1)
 
void removeSkyBox ()
 
void removeSkyDome ()
 
void removeSkyPlane ()
 
void setResolution (const graphics::Resolution &resolution)
 changes resolution to given one More...
 
void setFullscreen (bool fullscreen)
 changes fullscreen mode of window More...
 
void setShadowTechnique (graphics::ShadowTechnique st)
 sets the shadow technique More...
 
void registerNotifyCallback (const boost::function< void(int64_t)> &f)
 register callback for notifying IDs, call only from GraphicsController More...
 
void notifyNewID (int64_t id)
 notifies new id in subsystem More...
 
void resetSubSystem ()
 resets the subsystem to it's defaults More...
 
void setPossibleResolutions (const std::vector< graphics::Resolution > &resolutions)
 sets possible resolutions, called by graphics subsystem More...
 
std::vector< graphics::ResolutiongetPossibleResolutions () const
 returns all resolutions the graphics subsystem can show More...
 
graphics::Resolution getCurrentResolution () const
 returns current resolution More...
 
void setSelectables (const std::vector< std::pair< int64_t, Vec3 >> selectables)
 sets the selectables, only used by graphics More...
 
std::vector< std::pair< int64_t, Vec3 > > getSelectables () const
 returns the selectables More...
 
void setLinearFog (const Vec3 &colour, double start, double end) const
 sets linear fog More...
 
void setExponentialFog (const Vec3 &colour, double density) const
 sets exponential fog More...
 
void setExponentialFog2 (const Vec3 &colour, double density) const
 sets exponential fog (2, faster increase of density) More...
 
void takeScreenshot (const std::string &prefix, const std::string &suffix) const
 make a screenshot of current scene using prefix, timestamp and suffix More...
 
void showFPS (double x, double y, const std::string &imageStyle, const std::string &printStyle, const std::string &imageset, const std::string &image) const
 shows graphic frames More...
 
void hideFPS () const
 hides graphic frames More...
 
void getHighestCoordinate (const Vec3 &startPos, const std::function< void(Vec3)> &callback) const
 calls callback with highest position of a mesh More...
 

Detailed Description

Definition at line 39 of file GraphicsFacade.h.

Constructor & Destructor Documentation

i6e::api::GraphicsFacade::GraphicsFacade ( )
i6e::api::GraphicsFacade::~GraphicsFacade ( )

Member Function Documentation

void i6e::api::GraphicsFacade::closeViewports ( )

closes all viewports of the scene

graphics::Resolution i6e::api::GraphicsFacade::getCurrentResolution ( ) const
inline

returns current resolution

Definition at line 113 of file GraphicsFacade.h.

void i6e::api::GraphicsFacade::getHighestCoordinate ( const Vec3 startPos,
const std::function< void(Vec3)> &  callback 
) const

calls callback with highest position of a mesh

std::vector<graphics::Resolution> i6e::api::GraphicsFacade::getPossibleResolutions ( ) const
inline

returns all resolutions the graphics subsystem can show

Definition at line 106 of file GraphicsFacade.h.

std::vector<std::pair<int64_t, Vec3> > i6e::api::GraphicsFacade::getSelectables ( ) const
inline

returns the selectables

Definition at line 128 of file GraphicsFacade.h.

void i6e::api::GraphicsFacade::hideFPS ( ) const

hides graphic frames

void i6e::api::GraphicsFacade::notifyNewID ( int64_t  id)

notifies new id in subsystem

void i6e::api::GraphicsFacade::registerNotifyCallback ( const boost::function< void(int64_t)> &  f)

register callback for notifying IDs, call only from GraphicsController

void i6e::api::GraphicsFacade::removeSkyBox ( )
void i6e::api::GraphicsFacade::removeSkyDome ( )
void i6e::api::GraphicsFacade::removeSkyPlane ( )
void i6e::api::GraphicsFacade::resetSubSystem ( )

resets the subsystem to it's defaults

void i6e::api::GraphicsFacade::setAmbientLight ( double  r,
double  g,
double  b 
)

sets the color for the ambient light of the scene

void i6e::api::GraphicsFacade::setExponentialFog ( const Vec3 colour,
double  density 
) const

sets exponential fog

Parameters
colourcolour of the fog
densitythe density of the fog
void i6e::api::GraphicsFacade::setExponentialFog2 ( const Vec3 colour,
double  density 
) const

sets exponential fog (2, faster increase of density)

Parameters
colourcolour of the fog
densitythe density of the fog
void i6e::api::GraphicsFacade::setFullscreen ( bool  fullscreen)

changes fullscreen mode of window

void i6e::api::GraphicsFacade::setLinearFog ( const Vec3 colour,
double  start,
double  end 
) const

sets linear fog

Parameters
colourcolour of the fog
startthe distance the fog starts
endthe distance the fog is complete thick
void i6e::api::GraphicsFacade::setPossibleResolutions ( const std::vector< graphics::Resolution > &  resolutions)
inline

sets possible resolutions, called by graphics subsystem

Definition at line 99 of file GraphicsFacade.h.

void i6e::api::GraphicsFacade::setResolution ( const graphics::Resolution resolution)

changes resolution to given one

void i6e::api::GraphicsFacade::setSelectables ( const std::vector< std::pair< int64_t, Vec3 >>  selectables)
inline

sets the selectables, only used by graphics

Definition at line 120 of file GraphicsFacade.h.

void i6e::api::GraphicsFacade::setShadowTechnique ( graphics::ShadowTechnique  st)

sets the shadow technique

void i6e::api::GraphicsFacade::setSkyBox ( const std::string &  material,
double  distance = 5000.0,
bool  renderFirst = true 
)

adds a sky box to the world

void i6e::api::GraphicsFacade::setSkyDome ( const std::string &  material,
int32_t  curvature = 10,
double  tiles = 8.0,
double  distance = 4000.0,
bool  renderFirst = true 
)
void i6e::api::GraphicsFacade::setSkyPlane ( const std::string &  material,
double  distance,
int32_t  direction,
int32_t  size = 1000,
double  tiles = 10.0,
bool  renderFirst = true,
double  curvature = 0.0,
int32_t  xSegments = 1,
int32_t  ySegments = 1 
)
void i6e::api::GraphicsFacade::showFPS ( double  x,
double  y,
const std::string &  imageStyle,
const std::string &  printStyle,
const std::string &  imageset,
const std::string &  image 
) const

shows graphic frames

Parameters
xx position of the frames window
yy position of the frames window
imageStylestyle of the image
printStylestyle of the print
imagesetimageset of the frame window
imageimage of the frame window
void i6e::api::GraphicsFacade::takeScreenshot ( const std::string &  prefix,
const std::string &  suffix 
) const

make a screenshot of current scene using prefix, timestamp and suffix

Parameters
prefixprefix of the file
suffixsuffix of the file, something like .bmp

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