OpenIG  2.0.4
cross-platform open-source OpenSceneGraph Image Generator
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
OpenIG::Engine Class Reference

The OpenIG class. More...

#include <Engine.h>

Inheritance diagram for OpenIG::Engine:
OpenIG::Base::ImageGenerator OpenIG::PluginBase::PluginHost

Public Types

enum  SetupFlags {
  None = 0x00, WithTerminal = 0x01, WithSplashScreen = 0x02, WithOnscreenHelp = 0x04,
  Standard = WithTerminal | WithSplashScreen | WithOnscreenHelp
}
 OpenIG specific flags for how to setup the Viewer. More...
 
enum  ViewType { OTW = 1, EO = 2, IR = 3 }
 Setup a View with OpenIG with rendering options. More...
 
typedef osg::ref_ptr< osg::MatrixTransform > LightEntity
 Represntation of LightEntity. More...
 
typedef std::map< unsigned int, LightEntityLightsMap
 
typedef std::map< unsigned int, LightEntity >::iterator LightsMapIterator
 
typedef std::map< unsigned int, LightEntity >::const_iterator LightsMapConstIterator
 
- Public Types inherited from OpenIG::Base::ImageGenerator
enum  AnimationStatus {
  Play, Stop, Reset, Pause,
  Restore
}
 Changes the animation status. More...
 
typedef std::vector< unsigned int > ViewIdentifiers
 One might want to have the Image Generator only in some views, so this typedef holds the IDs of the views - an ID is the order of the View in it's parent CompositeViewer. More...
 
typedef std::map< unsigned int, LightAttributes > LightAttributesMap
 
typedef osg::ref_ptr< osg::MatrixTransform > Entity
 This is our Entity, a base for models in the scene. More...
 
typedef std::map< unsigned int, EntityEntityMap
 
typedef std::map< unsigned int, Entity >::iterator EntityMapIterator
 
typedef std::map< unsigned int, Entity >::const_iterator EntityMapConstIterator
 
- Public Types inherited from OpenIG::PluginBase::PluginHost
typedef std::map< int, osg::ref_ptr< OpenIG::PluginBase::Plugin > > PluginsMap
 
typedef std::map< int, osg::ref_ptr< OpenIG::PluginBase::Plugin > >::iterator PluginsMapIterator
 
typedef std::map< int, osg::ref_ptr< OpenIG::PluginBase::Plugin > >::const_iterator PluginsMapConstIterator
 

Public Member Functions

 Engine ()
 Constructor. More...
 
virtual void loadScript (const std::string &fileName)
 Load a script with commands on startup. More...
 
virtual std::string version ()
 Gets the version. More...
 
virtual void setupInitFlags (unsigned int mask)
 Call this before. More...
 
virtual void init (osgViewer::CompositeViewer *viewer, const std::string &xmlFileName="openig.xml", const ViewIdentifiers &ids=ViewIdentifiers())
 Performs init of the ImageGenerator. More...
 
virtual void initView (osgViewer::View *view, ViewType options=OTW)
 Setup a View with OpenIG. More...
 
virtual void setViewType (osgViewer::View *view, ViewType options)
 Setup the view option for a view. More...
 
virtual void cleanup ()
 Performs cleanup. More...
 
virtual void frame (bool usePlugins=true)
 The frame, should be called in a loop. More...
 
virtual void setReadNodeImplementationCallback (ReadNodeImplementationCallback *cb)
 Sets the read node callback. More...
 
virtual ReadNodeImplementationCallbackgetReadNodeImplementationCallback ()
 Gets the read node callback. More...
 
virtual void setReadFileCallback (osgDB::Registry::ReadFileCallback *cb)
 Sets user ReadFileCallback. More...
 
virtual osgDB::Registry::ReadFileCallback * getReadFileCallback ()
 Gets the user ReadFileCallback. More...
 
virtual void addEntity (unsigned int id, const std::string &fileName, const osg::Matrixd &mx, const osgDB::Options *options=0)
 Adds Entity in the scene. More...
 
virtual void addEntity (unsigned int id, const osg::Node *node, const osg::Matrixd &mx, const osgDB::Options *options=0)
 Adds entity in the scene from osg::Node instead of loading it from a file. More...
 
virtual void removeEntity (unsigned int id)
 Removes Entity from the scene. More...
 
virtual void updateEntity (unsigned int id, const osg::Matrixd &mx)
 Updates Entity. More...
 
virtual void showEntity (unsigned int id, bool show)
 Show/Hide Entity. More...
 
virtual void bindToEntity (unsigned int id, unsigned int toEntityId)
 Attach one Entity to another. More...
 
virtual void unbindFromEntity (unsigned int id)
 Detach an Entity from its parent Entity. More...
 
virtual void bindEntityToCamera (unsigned int id, const osg::Matrixd &mx, unsigned int cameraID=0)
 Binds an Entity to the Camera. More...
 
virtual void bindEntityToCameraUpdate (unsigned int id, const osg::Matrixd &mx)
 Updates the Entity. More...
 
virtual void unbindEntityFromCamera (unsigned int id)
 Unbinds the Entity from a Camera. More...
 
virtual void reloadEntity (unsigned int id, const std::string &fileName, const osgDB::Options *options=0)
 
virtual void setEntityName (unsigned int id, const std::string &name)
 Sets a name for an Entity. More...
 
virtual std::string getEntityName (unsigned int id)
 Geets a name for an Entity. More...
 
virtual unsigned int getEntityId (unsigned int parentEntityId, const std::string &subEntityName)
 Gets the id of a entity based on the name. More...
 
virtual void playAnimation (unsigned int entityId, const std::string &animationName)
 Plays animation on an Entity. More...
 
virtual void playAnimation (unsigned int entityId, const OpenIG::Base::StringUtils::StringList &animations)
 Plays multiple animations on an Entity at once. More...
 
virtual void playAnimation (unsigned int entityId, const std::string &animationName, OpenIG::Base::RefAnimationSequenceCallbacks *cbs)
 
virtual void stopAnimation (unsigned int entityId, const std::string &animationName)
 Stops the playback of animation. More...
 
virtual void stopAnimation (unsigned int entityId, const OpenIG::Base::StringUtils::StringList &animations)
 Stops the playback of animation. More...
 
virtual void resetAnimation (unsigned int entityId, const std::string &animationName)
 Reset the playback of animation. More...
 
virtual void resetAnimation (unsigned int entityId, const OpenIG::Base::StringUtils::StringList &animations)
 Reset the playback of multiple animations at once. More...
 
virtual void changeAnimationStatus (unsigned int entityId, AnimationStatus status, const OpenIG::Base::StringUtils::StringList &animations)
 Changes the animation status. More...
 
virtual void addEffect (unsigned int id, const std::string &name, const osg::Matrixd &mx, const std::string &attributes)
 Adds effect to the scene. More...
 
virtual void removeEffect (unsigned int id)
 Removes effect from the scene. More...
 
virtual void bindEffect (unsigned int id, unsigned int entityID, const osg::Matrixd &mx)
 Binds effect to an Entity. More...
 
virtual void unbindEffect (unsigned int id)
 Unbinds effect to an Entity. More...
 
virtual void updateEffect (unsigned int id, const osg::Matrixd &mx)
 Update effect with new position/orientation. More...
 
virtual void setEffectImplementationCallback (OpenIG::Base::GenericImplementationCallback *cb)
 Sets the effect implementation callback. More...
 
virtual void setCameraPosition (const osg::Matrixd &mx, bool viewMatrix=false, unsigned int cameraID=0)
 Set the position of the camera. More...
 
virtual void bindCameraToEntity (unsigned int id, const osg::Matrixd &mx, unsigned int cameraID=0)
 Binds camera to an Entity. More...
 
virtual void bindCameraUpdate (const osg::Matrixd &mx, unsigned int cameraID=0)
 Updates the camera. More...
 
virtual void unbindCameraFromEntity (unsigned int cameraID=0)
 Unbinds the Camera from an Entity. More...
 
virtual bool isCameraBoundToEntity (unsigned int cameraID=0)
 Checks if the Camera is bound to an Entity. More...
 
virtual void bindCameraSetFixedUp (bool fixedUp, bool freezeOrientation=false, unsigned int cameraID=0)
 Sets for fixed up Cametra orientation or not. More...
 
virtual void setFog (double visibility)
 Sets fog in the scene. More...
 
virtual void setDate (unsigned int month, int day, int year)
 Sets the simulation date. More...
 
virtual void setTimeOfDay (unsigned int hour, unsigned int minutes)
 Sets the time of day. More...
 
virtual void setRain (double factor)
 Sets rain in the scene. More...
 
virtual void setSnow (double factor)
 Sets snow in the scene. More...
 
virtual void setWind (float speed, float direction=0.f)
 Sets wind in the scene. More...
 
virtual void addCloudLayer (unsigned int id, int type, double altitude, double thickness=0, double density=0.3, bool enable=true)
 Adds cloud layer in the scene. More...
 
virtual void removeCloudLayer (unsigned int id)
 Removes a cloud layer from the scene. More...
 
virtual void updateCloudLayer (unsigned int id, double altitude, double thickness, double density)
 Update a cloud layer in the scene. More...
 
virtual void removeAllCloudlayers ()
 Removes all cloud layers from the scene. The openig::OpenIG is not implementing this instead it uses OpenIG::PluginBase::PluginContext::Attribute to pass commands to all the plugins that might deal with such atmospheric effects. See addCloudLayer for more info. More...
 
virtual void createCloudLayerFile (unsigned int id, int type, double altitude, double thickness=0, double density=0.3, bool enable=true, std::string filename="")
 Adds cloud layer in the scene. More...
 
virtual void enableCloudLayer (unsigned int id, bool enableIn=true)
 Enables a previously loaded but distabled cloud layer in the scene. More...
 
virtual void removeCloudLayerFile (unsigned int id)
 Removes a cloud layer file from the system. More...
 
virtual void loadCloudLayerFile (unsigned int id, int type, std::string filename)
 Manipulates cloud layers using saved cloudlayer files from SilverLinings API. The openig::OpenIG is not implementing this instead it uses igplugincore::PluginContext::Attribute to pass commands to all the plugins that might deal with such atmospheric effects. See loadCloudLayer for more info. More...
 
virtual void addLight (unsigned int id, const OpenIG::Base::LightAttributes &lightAttributes, const osg::Matrixd &mx)
 Adds light source in the scene. More...
 
virtual void removeLight (unsigned int id)
 Removes light from the scene. More...
 
virtual void updateLight (unsigned int id, const osg::Matrixd &mx)
 Updates a light in the scene. More...
 
virtual void setLightUserData (unsigned int id, osg::Referenced *data)
 Sets user data to a light created by a callback. More...
 
virtual void bindLightToEntity (unsigned int id, unsigned int entityId)
 Binds a light to an Entity. More...
 
virtual void unbindLightFromEntity (unsigned int id)
 Unbinds light from an Entity, if bound. More...
 
virtual void enableLight (unsigned int id, bool enable, bool hard=true)
 Enables/disables light in the scene. More...
 
virtual void bindLightToCamera (unsigned int id, const osg::Matrixd &offset=osg::Matrixd::identity())
 Binds light to a Camera. More...
 
virtual void unbindLightFromcamera (unsigned int id)
 Unbinds the light from a Camera. More...
 
virtual bool isLightEnabled (unsigned int id)
 Test if a light is enabled. More...
 
virtual LightAttributesMap & getLightAttributesMap ()
 Returns the LightAttributes map. More...
 
virtual OpenIG::Base::LightAttributes getLightAttributes (unsigned int id)
 Returns the LightAttributes based on the light ID. More...
 
virtual void updateLightAttributes (unsigned int id, const OpenIG::Base::LightAttributes &attribs)
 Update lights attributes, like colors etc.. More...
 
virtual void preRender ()
 override preRender method to be called from within a frame More...
 
virtual void postRender ()
 override postRender method to be called from within a frame More...
 
void setUpdateViewerCameraManipulator (bool update)
 Sets to update any CameraMainpulator coming with the viewer on openig::OpenIG. More...
 
virtual OpenIG::Base::LightImplementationCallback * getLightImplementationCallback ()
 Returns the reference for the light implementation callback. More...
 
virtual void setLightImplementationCallback (OpenIG::Base::LightImplementationCallback *cb)
 Sets the light implementation callback. More...
 
virtual osgViewer::CompositeViewer * getViewer ()
 Returns the viewer. More...
 
virtual osg::Node * getScene ()
 Get the managed scene. More...
 
virtual EntityMap & getEntityMap ()
 The ID based Entity std::map. More...
 
virtual float getTerrainHeight (const osg::Vec3 &position)
 The height of terrain at the given position. More...
 
virtual float getIntersect (const osg::Vec3 &pos, const osg::Vec3 &angles, float angle)
 The distance from input position to the first intersect. More...
 
virtual osg::Vec3 getIntersectPos (const osg::Vec3 &pos, const osg::Vec3 &angles, float angle, float height=100000)
 The distance from input position to the first intersect. More...
 
virtual osg::LightSource * getSunOrMoonLight ()
 The light that represents sun/moon in the scene. More...
 
virtual osg::Fog * getFog ()
 The scene fog. More...
 
OpenIG::PluginBase::PluginContextgetPluginContext ()
 Returns the internal OpenIG::PluginBase::PluginContext. More...
 
LightsMap & getLightsMap ()
 Returns the ID based std::map of LightEntity. More...
 
const OpenIG::Base::StringUtils::StringList & getFilesToBeCached () const
 Returns the list of files that use file cache. More...
 
void addFilesToBeCached (const OpenIG::Base::StringUtils::StringList &files)
 Adds files to use the cache. More...
 
bool isFileCached (const std::string &fileName)
 Returns true if the given file is using the file cache. More...
 
- Public Member Functions inherited from OpenIG::Base::ImageGenerator
 ImageGenerator ()
 Constructor. More...
 
virtual ~ImageGenerator ()
 Destructor. More...
 
virtual void setEffectImplementationCallback (GenericImplementationCallback *cb)=0
 Sets the effect implementation callback. More...
 
virtual void setLightImplementationCallback (LightImplementationCallback *cb)=0
 Sets the light implementation callback. More...
 
virtual void addLight (unsigned int id, const LightAttributes &lightAttributes, const osg::Matrixd &mx)=0
 Adds light source in the scene. More...
 
virtual void updateLightAttributes (unsigned int id, const LightAttributes &attribs)=0
 Update lights attributes, like colors etc.. More...
 
- Public Member Functions inherited from OpenIG::PluginBase::PluginHost
 PluginHost ()
 Constructor. More...
 
 ~PluginHost ()
 Destructor. More...
 
void loadPlugins (const std::string &path, const std::string &configFileName="")
 Loads all the plugins. More...
 
void unloadPlugins ()
 Unloads all plugins. More...
 
void applyPluginOperation (OpenIG::PluginBase::PluginOperation *operation)
 Apply plugin operation on all the plugins in a sorted fashion. More...
 
const PluginsMap & getPlugins () const
 Gets all the plugins in order number based std::map. More...
 

Protected Types

typedef osg::ref_ptr< osg::MatrixTransform > Effect
 Our Effect.
 
typedef std::map< unsigned int, EffectEffectMap
 
typedef std::map< std::string, osg::ref_ptr< osg::Node > > EntityCache
 The file cache map.
 
- Protected Types inherited from OpenIG::PluginBase::PluginHost
typedef std::map< std::string, osg::ref_ptr< osgDB::DynamicLibrary > > PluginLibrariesMap
 The plugin order number based std::map.
 
typedef std::map< std::string, osg::ref_ptr< osgDB::DynamicLibrary > >::iterator PluginLibrariesMapIterator
 
typedef std::map< std::string, osg::ref_ptr< osgDB::DynamicLibrary > >::const_iterator PluginLibrariesMapConstIterator
 

Protected Member Functions

virtual ~Engine ()
 Destructor.
 
void initViewer (osgViewer::CompositeViewer *viewer, const ViewIdentifiers &ids=ViewIdentifiers())
 Init the viewer. It calls initScene and add the ViewerOperation for managing the Entity maps. See OpenIG::Base::ImageGenerator::addEntity. More...
 
void initTerminal ()
 Peforms init on the onscreen command line terminal. More...
 
void initCommands ()
 Performs init of commands. More...
 
void initPluginContext ()
 Inits the internal OpenIG::PluginBase::PluginContext. More...
 
void initScene ()
 Init the scene. More...
 
void initOnScreenHelp ()
 Init the onscreen help. More...
 
void initSplashScreen ()
 Init the splash screen. More...
 
void initEffects ()
 Init the effects. More...
 
void createSunMoonLight ()
 Creates sun/moon light with the reserved ID 0. More...
 
- Protected Member Functions inherited from OpenIG::PluginBase::PluginHost
bool isPlugin (const std::string &fileName) const
 Filename based std::map of the plugins shared libraries. More...
 

Protected Attributes

EntityMap _entities
 The current added in the scene Entity es, ID based std::map.
 
osg::ref_ptr< osgUtil::IntersectVisitor > _intersect
 
osg::observer_ptr< osgViewer::CompositeViewer > _viewer
 Handle of the viewer you have passed in init.
 
osg::ref_ptr< osg::LightSource > _sunOrMoonLight
 Handle of the sun/moon light source with reserved ID of 0.
 
osg::ref_ptr< osg::Fog > _fog
 Handle of Fog attribute.
 
osg::ref_ptr< osg::Group > _scene
 The managed scene, which is osgShadow::Shadowed scene.
 
osg::observer_ptr< OpenIG::Base::LightImplementationCallback > _lightImplementationCallback
 Handle of the light implementation callback. See setLightImplementationCallback.
 
OpenIG::PluginBase::PluginContext _context
 The OpenIG::PluginBase::PluginContext to pass Attributes, ex: OpenIG::Base::FogAttributes to plugins.
 
LightsMap _lights
 ID based std::map of lights. See addLight.
 
osg::ref_ptr< osg::Group > _lightsGroup
 Root of the lights in the scene. This is passed in the OpenIG::Base::LightImplementationCallback.
 
osg::ref_ptr< KeyPadEventHandler > _keypad
 Build-in Keypad Event Handler. See the onscreen help available on F7 for the keypad command.
 
osg::ref_ptr< KeyPadCameraManipulator > _keypadCameraManipulator
 Build-in Keypad Camera manipulator. See the onscreen help available on F7 for the keypad command.
 
osg::ref_ptr< osgGA::CameraManipulator > _viewerCameraManipulator
 Handle of any CameraManipulator that was attached on the Viewer you provided in init.
 
bool _sceneCreatedByOpenIG
 Set to true if there was no scene created with your Viewer.
 
bool _updateViewerCameraMainpulator
 If true with setUpdateViewerCameraManipulator then the provided CameraManipulator is updated as well with any OpenIG Camera update method.
 
osg::ref_ptr< osg::Camera > _splashCamera
 Handle of the splash screen.
 
bool _splashOn
 Switch set to true when the splash screen is on.
 
osg::ref_ptr< osg::Group > _effectsRoot
 The root of the effects.
 
osg::ref_ptr< OpenIG::Base::GenericImplementationCallback > _effectsImplementationCallback
 The effect implementation callback.
 
EffectMap _effects
 
LightAttributesMap _lightAttributes
 The Light Attributes.
 
osg::ref_ptr< ReadNodeImplementationCallback_readFileCallback
 The read file callback.
 
EntityCache _entityCache
 
OpenIG::Base::StringUtils::StringList _filesToBeCached
 The files to be cached.
 
unsigned int _setupMask
 setup mask
 
osg::ref_ptr< osgDB::Registry::ReadFileCallback > _userReadFileCallback
 user ReadFileCallback
 
- Protected Attributes inherited from OpenIG::PluginBase::PluginHost
PluginsMap _plugins
 
PluginLibrariesMap _pluginLibraries
 

Detailed Description

The OpenIG class.

Implementation of OpenIG::Base::ImageGenerator

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015

Member Typedef Documentation

typedef osg::ref_ptr<osg::MatrixTransform> OpenIG::Engine::LightEntity

Represntation of LightEntity.

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015

Member Enumeration Documentation

OpenIG specific flags for how to setup the Viewer.

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Setup a View with OpenIG with rendering options.

This is to let the user setup a View with OpenIG with some sepcifics for the rendering, like OTW, Sensor etc. Possibly to be extended as we go

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Thu Feb 25 2016

Constructor & Destructor Documentation

OpenIG::Engine::Engine ( )

Constructor.

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015

Member Function Documentation

virtual void OpenIG::Engine::addCloudLayer ( unsigned int  id,
int  type,
double  altitude,
double  thickness = 0,
double  density = 0.3,
bool  enable = true 
)
virtual

Adds cloud layer in the scene.

Adds cloud layer in the scene. The openig::OpenIG is not implementing this feature instead it creates OpenIG::Base::CLoudLayerAttributes via OpenIG::PluginBase::PluginContext::Attribute and it is passing it to all the plugins. As a reference that implements this feature can be the SilverLiningPlugin. Also the cloud layers are expected to be ID based, the id provided here is the handle for any clouds operation you might use

Parameters
idThe id of the cloud layer
typeThe type of the cloud layer. Can be anything, or plugin specific
altitudeThe attitude of the cloud layer
thicknessThe thickness of the cloud layer
densityDensity of the cloud layer. This can be anything but some plugins that implement atmospheric effects like the SilverLiningPlugin are expecting this to be only in the range of 0.0-1.0
widthThe width of the cloud layer
lengthThe length of the cloud layer
infinityDoes the cloud layer go on forever?
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::addEffect ( unsigned int  id,
const std::string &  name,
const osg::Matrixd &  mx,
const std::string &  attributes 
)
virtual

Adds effect to the scene.

Adds effect to the scene. This oonly manages internal structures, it is up to plugins to provide implementation

Parameters
idUnique effect to the scene
nameName of the effect
mxThe initial position/orientation of the effect
attributesString based attributes for the pugins provoding the implementation, in form of token=attr;token=attr ...
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jun 14 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::addEntity ( unsigned int  id,
const std::string &  fileName,
const osg::Matrixd &  mx,
const osgDB::Options *  options = 0 
)
virtual

Adds Entity in the scene.

OpenIG is using IDs for everything in the scene management. The IDs are mainly up to the user to maintain. However some plugins generates these IDs automatically, for example the ModelCompositionPlugin or the LightingPlugin. For the automated ID generations there is a class OpenIG::Base::GlobalIdGenerator.

Parameters
idThe id of the Entity. You should use this Entity id to refer to this model in the scene
fileNameThe file name of the model
mxInitial position as osg::Matrixd
optionsOptional. The option string can be processed by some plugins. Good example can be the VDBOffset which shifts the database by a given offset defined in the osgDB::Options string.
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::addEntity ( unsigned int  id,
const osg::Node *  node,
const osg::Matrixd &  mx,
const osgDB::Options *  options = 0 
)
virtual

Adds entity in the scene from osg::Node instead of loading it from a file.

Adds entity in the scene from osg::Node instead of loading it from a file. See addEntity

Parameters
idThe id of the Entity. You should use this Entity id to refer to this model in the scene
nodeThe node to become an Entity
mxInitial position as osg::Matrixd
optionsOptional. The option string can be processed by some plugins. Good example can be the VDBOffset which shifts the database by a given offset defined in the osgDB::Options string.
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Tue Jun 16 2015

Implements OpenIG::Base::ImageGenerator.

void OpenIG::Engine::addFilesToBeCached ( const OpenIG::Base::StringUtils::StringList &  files)

Adds files to use the cache.

Parameters
fileListThe list of files that will use file cache
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sat Jun 27 2015
virtual void OpenIG::Engine::addLight ( unsigned int  id,
const OpenIG::Base::LightAttributes &  lightAttributes,
const osg::Matrixd &  mx 
)
virtual

Adds light source in the scene.

Adds light source in the scene. As all others scene players, like Entity, Lights are ID based. The ID management is up to the user, or one can use the simple OpenIG::Base::GlobalIdGenerator. Actually the OpenIG::Base::GlobalIdGenerator is used by plugins to create lights for the scene that might be defined in XML. We will mention the ModelCompositionPlugin and the LightingPlugin which use automatic ID generation using the OpenIG::Base::GlobalIdGenerator class. The initial position and orientation of the lightsource is provided by a Matrix. If the light is bound to the Camera or an Entity this Matrix defines the local to Camera Entity offset ID 0 is reserved for scene sun/moon light

Parameters
idThe id of the light
mxThe initial position and orientation of the light. You might want to use OpenIG::Base::Math to create this matrix
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
virtual void OpenIG::Engine::bindCameraSetFixedUp ( bool  fixedUp,
bool  freezeOrientation = false,
unsigned int  cameraID = 0 
)
virtual

Sets for fixed up Cametra orientation or not.

Sets for fixed up Cametra orientation or not. When is set with false, and is bound to an Entity it follows the Entity orientation, as an example can be the Camera attached to a plane model to have pilot view. When set with true, then the up axis is fixed and the Camera is not following the Entity orientation, like a bird eye.

Parameters
fixedUptrue to fix the up axis or false to follow the Entity orientation
freezeOrientationtrue to freeze orientation
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::bindCameraToEntity ( unsigned int  id,
const osg::Matrixd &  mx,
unsigned int  cameraID = 0 
)
virtual

Binds camera to an Entity.

Binds the camera to an Entity. Then as the Entity is moving, the Camera is movving along with. The given Matrix is the local offset

Parameters
idThe id of the Entity, the one you have used with addEntity
mxThe local offset wrt. to the Entity
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::bindCameraUpdate ( const osg::Matrixd &  mx,
unsigned int  cameraID = 0 
)
virtual

Updates the camera.

Updates the camera if it is bound to an Entity with new position and orientation through Matrix. Might be handy to use OpenIG::Base::Math methods like OpenIG::Base::Math::toMatrix to construct the Matrix

Parameters
mxThe local offset wrt. to the Entity
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::bindEffect ( unsigned int  id,
unsigned int  entityID,
const osg::Matrixd &  mx 
)
virtual

Binds effect to an Entity.

Binds effect to an Entity

Parameters
idUnique effect to the scene
entityIDThe ID of the Entity
mxThe offset position/orientation of the effect
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jun 14 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::bindEntityToCamera ( unsigned int  id,
const osg::Matrixd &  mx,
unsigned int  cameraID = 0 
)
virtual

Binds an Entity to the Camera.

Binds an Entity to the Camera. The given Matrix is the local offset

Parameters
idThe id of the Entity, the one you have used with addEntity
mxThe local offset wrt. to the Entity
cameraIDThe ID of the Camera (think View)
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun May 02 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::bindEntityToCameraUpdate ( unsigned int  id,
const osg::Matrixd &  mx 
)
virtual

Updates the Entity.

Updates the Entity if it is bound to the Camera with new position and orientation through Matrix. Might be handy to use OpenIG::Base::Math methods like OpenIG::Base::Math::toMatrix to construct the Matrix

Parameters
idThe id of the Entity, the one you have used with addEntity
mxThe matrix to update position and orientation
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun May 02 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::bindLightToCamera ( unsigned int  id,
const osg::Matrixd &  offset = osg::Matrixd::identity() 
)
virtual

Binds light to a Camera.

Binds light to a Camera. Once this is called, the light follows the Camera moves and it is attached to a local Camera offset defined by the Matrix. You might want to use the OpenIG::Base::Math class to contruct the Matrix. To get more info about light implementation, light IDs and their management please refer to setLightImplementationCallback and addLight

Parameters
idThe ID of the light.
offsetThe offset wrt. the Camera
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::bindLightToEntity ( unsigned int  id,
unsigned int  entityId 
)
virtual

Binds a light to an Entity.

Binds a light to an Entity. If you need to understand the ID paradigm refer to addEntity and addLight.

Parameters
idThe ID of the light
entityIdThe ID of the Entity
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::bindToEntity ( unsigned int  id,
unsigned int  toEntityId 
)
virtual

Attach one Entity to another.

Attach one Entity to another. Then it makes it Sub-Entity. The offset is defined with the osg::Matrixd used in update Entity. Then this position and orientation become local to the parent Entity

Parameters
idThe id of the Entity. This is the id you have used with addEntity
toEntityIdThe id of the parent Entity
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::changeAnimationStatus ( unsigned int  entityId,
AnimationStatus  status,
const OpenIG::Base::StringUtils::StringList &  animations 
)
virtual

Changes the animation status.

Changes the animation status

Parameters
entityIdThe ID of the entity
statusThe status of the animation
animationsThe names of the animations
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Tue May 17 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::cleanup ( )
virtual

Performs cleanup.

Call it before destruction

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::createCloudLayerFile ( unsigned int  id,
int  type,
double  altitude,
double  thickness = 0,
double  density = 0.3,
bool  enable = true,
std::string  filename = "" 
)
virtual

Adds cloud layer in the scene.

Adds a new cloud layer file to the system. The openig::OpenIG is not implementing this feature instead it creates OpenIG::Base::CLoudLayerAttributes via OpenIG::PluginBase::PluginContext::Attribute and it is passing it to all the plugins. As a reference that implements this feature can be the SilverLiningPlugin. Also the cloud layers are expected to be ID based, the id provided here is the handle for any clouds operation you might use

Parameters
idThe id of the cloud layer
typeThe type of the cloud layer. Can be anything, or plugin specific
altitudeThe attitude of the cloud layer
thicknessThe thickness of the cloud layer
densityDensity of the cloud layer. This can be anything but some plugins that implement atmospheric effects like the SilverLiningPlugin are expecting this to be only in the range of 0.0-1.0
enableThe enable setting for the cloudlayer, enabled(true) you can see it, disabled(false) it can be loaded but not visible and also not updated to increase performance. Enable it and its seen immediately with no delay/pause.
filenameThe full path where the saved cloud file will be written
Author
Curtis Rubel openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Tue Nov 8 2016

Implements OpenIG::Base::ImageGenerator.

void OpenIG::Engine::createSunMoonLight ( )
protected

Creates sun/moon light with the reserved ID 0.

Creates sun/moon light with the reserved ID 0

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Wed Nov 4 2015
virtual void OpenIG::Engine::enableCloudLayer ( unsigned int  id,
bool  enableIn = true 
)
virtual

Enables a previously loaded but distabled cloud layer in the scene.

Enables a cloud layer already loaded into the atmosphere. The openig::OpenIG is not implementing this instead it uses OpenIG::PluginBase::PluginContext::Attribute to pass commands to all the plugins that might deal with such atmospheric effects. See addCloudLayer for more info

Parameters
idThe id of the clouds layer file to be enabled in the scene
enableWhether we are enabling or disabling this cloudLayer
Author
Curtis Rubel openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Tue Nov 08 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::enableLight ( unsigned int  id,
bool  enable,
bool  hard = true 
)
virtual

Enables/disables light in the scene.

Enables/disables light in the scene. Please refer to addLight to get more info about lights ID and their management

Parameters
idThe ID of the light to enable/disable
enabletrue for enable, false for disable
hardtrue for enable/disable even if this is animated light wich might internally use callback for simulating pulses via this call
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::frame ( bool  usePlugins = true)
virtual

The frame, should be called in a loop.

It calls viewer->frame() and performs internal calling of plugins hooks like, update, preFrame, postFrame. This method mimics the viewer->frame() call, only inserts hooks for OpenIG::PluginBase::Plugin methods, in this order, as is implemented in openig::OpenIG::frame :

// pseudocode
// call these first
_viewer->advance();
_viewer->eventTraversal();
_viewer->updateTraversal();
// here we call the OpenIG::PluginBase::Plugin::update on all plugins
// via OpenIG::PluginBase::PluginOperation
// here ImageGenerator::preRender is called
// here we call the OpenIG::PluginBase::Plugin::preFrame on all plugins
// via OpenIG::PluginBase::PluginOperation
// call the rendering
_viewer->renderingTraversals();
// here we call the OpenIG::PluginBase::Plugin::postFrame on all plugins
// via OpenIG::PluginBase::PluginOperation
// here ImageGenerator::postRender is called
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual unsigned int OpenIG::Engine::getEntityId ( unsigned int  parentEntityId,
const std::string &  subEntityName 
)
virtual

Gets the id of a entity based on the name.

Gets the id of a entity based on the name. Can be handy for lookup

Parameters
idThe id of parent entity
nameThe name of entity/sub-entity
Returns
The Sub-Entity id
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jun 17 2016

Implements OpenIG::Base::ImageGenerator.

virtual EntityMap& OpenIG::Engine::getEntityMap ( )
virtual

The ID based Entity std::map.

The ID based Entity std::map. Inheritants are expected to maintain this map along with all the scene management methods, as addEntuty etc ... openig::OpenIG is doing so

Returns
The recent ID based Entity std::map
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual std::string OpenIG::Engine::getEntityName ( unsigned int  id)
virtual

Geets a name for an Entity.

Gets the name for an Entity. Can be handy for lookup

Parameters
idThe id of the attached Entity. This is the id you have used with addEntity
Returns
The Entity name
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Mon May 18 2015

Implements OpenIG::Base::ImageGenerator.

const OpenIG::Base::StringUtils::StringList& OpenIG::Engine::getFilesToBeCached ( ) const

Returns the list of files that use file cache.

Returns
The list of files that use file cache
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sat Jun 27 2015
virtual osg::Fog* OpenIG::Engine::getFog ( )
virtual

The scene fog.

The scene Fog attribute. See setFog for more info

Returns
The scene Fog attribute
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual float OpenIG::Engine::getIntersect ( const osg::Vec3 &  pos,
const osg::Vec3 &  angles,
float  angle 
)
virtual

The distance from input position to the first intersect.

The distance from input position to the first intersect

Returns
The distance from input position to the first intersect
Parameters
posCurrent position
anglesCurrent Yaw, Pitch and Roll
angleCurrent Heading
Author
Roni Zanolli openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Weds Aug 02 2016

Implements OpenIG::Base::ImageGenerator.

virtual osg::Vec3 OpenIG::Engine::getIntersectPos ( const osg::Vec3 &  pos,
const osg::Vec3 &  angles,
float  angle,
float  height = 100000 
)
virtual

The distance from input position to the first intersect.

The position of the intersection of our current pos and the angles input

Returns
The distance from input position to the first intersect
Parameters
posCurrent position
anglesCurrent Yaw, Pitch and Roll
angleCurrent Heading
Author
Roni Zanolli openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Weds Aug 02 2016

Implements OpenIG::Base::ImageGenerator.

virtual OpenIG::Base::LightAttributes OpenIG::Engine::getLightAttributes ( unsigned int  id)
virtual

Returns the LightAttributes based on the light ID.

Returns the LightAttributes for a given light. The inheritants are expected to keep track when they are updates. Plugins might use these

Parameters
idThe light ID
Returns
The light attributes of the Light
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sat Jun 06 2015

Implements OpenIG::Base::ImageGenerator.

virtual LightAttributesMap& OpenIG::Engine::getLightAttributesMap ( )
virtual

Returns the LightAttributes map.

Returns the LightAttributes map. The inheritants are expected to keep track when they are updates. Plugins might use these

Returns
The light attributes map
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sat Jun 06 2015

Implements OpenIG::Base::ImageGenerator.

virtual OpenIG::Base::LightImplementationCallback* OpenIG::Engine::getLightImplementationCallback ( )
virtual

Returns the reference for the light implementation callback.

Returns the reference for the light implementation callback. See OpenIG::Base::ImageGenerator::setLightImplementationCallback

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
LightsMap& OpenIG::Engine::getLightsMap ( )

Returns the ID based std::map of LightEntity.

Returns
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
OpenIG::PluginBase::PluginContext& OpenIG::Engine::getPluginContext ( )

Returns the internal OpenIG::PluginBase::PluginContext.

Returns
The internal OpenIG::PluginBase::PluginContext
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
virtual osgDB::Registry::ReadFileCallback* OpenIG::Engine::getReadFileCallback ( )
virtual

Gets the user ReadFileCallback.

Gets the user ReadFileCallback

Returns
The callback
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Thu Mar 17 2016

Implements OpenIG::Base::ImageGenerator.

virtual ReadNodeImplementationCallback* OpenIG::Engine::getReadNodeImplementationCallback ( )
virtual

Gets the read node callback.

Gets the Read node callback. See setReadNodeImplementationCallback

Returns
cb The callback
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Mon Jun 16 2015

Implements OpenIG::Base::ImageGenerator.

virtual osg::Node* OpenIG::Engine::getScene ( )
virtual

Get the managed scene.

Returns the node representing the managed scene. In openig::OpenIG this is the default osgShadow::ShadowedScene. Adding nodes to this scene will cause these nodes to be affected by plugins, as for example by the LightingPlugin which will have\ shaders applied to them.

Returns
The managed scene. See init
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual osg::LightSource* OpenIG::Engine::getSunOrMoonLight ( )
virtual

The light that represents sun/moon in the scene.

The light that represents sun/moon in the scene. It is the reserved light with an ID of 0

Returns
The light that represents sun/moon in the scene
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual float OpenIG::Engine::getTerrainHeight ( const osg::Vec3 &  position)
virtual

The height of terrain at the given position.

The height of the terrain at the current position

Returns
The height of terrain at the given position
Parameters
position– the current position
Author
Roni Zanolli openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Weds Aug 02 2016

Implements OpenIG::Base::ImageGenerator.

virtual osgViewer::CompositeViewer* OpenIG::Engine::getViewer ( )
virtual

Returns the viewer.

Returns the viewer used in init . Handy when using the OpenIG::Base::ImageGenerator in OpenIG::PluginBase::PluginContext given to plugins OpenIG::PluginBase::Plugin to access the viewer from within plugins

Returns
The viewer passed in init
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::init ( osgViewer::CompositeViewer *  viewer,
const std::string &  xmlFileName = "openig.xml",
const ViewIdentifiers ids = ViewIdentifiers() 
)
virtual

Performs init of the ImageGenerator.

Should be called immediatelly after making an instance. Here the setup of the scene and other things happen. By default openig::OpenIG scene is osgShadow::ShadowedScene with LightSpacePerspective shadow map technique. So the user is expected to add nodes directly to getScene, or if they want to handle it their own way, there is still osgView::View(x)->getSceneData()

Parameters
viewerYour Viewer. It is up to you how you set up expected is to have at least one View.
xmlFileNameThe file name of the xml configuration file. Defaults to openig.xml, on Windows in bin/igdata MacOS and Linux in /usr/local/bin/igdata
idsList of Views to which we let OpenIG render. If empty it will use all the Views with no SceneData associated
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

void OpenIG::Engine::initCommands ( )
protected

Performs init of commands.

Performs init of commands. Here some default commands are implemented. There is onscreen help where all the commands are listed with their usage, bound to F7

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
void OpenIG::Engine::initEffects ( )
protected

Init the effects.

Init the effects. Add the effects root to the scene

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jun 14 2015
void OpenIG::Engine::initOnScreenHelp ( )
protected

Init the onscreen help.

Init the onscreen help. It is bound to F7 where you can see all the available commands and their usage

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
void OpenIG::Engine::initPluginContext ( )
protected

Inits the internal OpenIG::PluginBase::PluginContext.

Inits the internal OpenIG::PluginBase::PluginContext. It only sets the image generattor to this. See OpenIG::PluginBase::PluginContext

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
void OpenIG::Engine::initScene ( )
protected

Init the scene.

Init the default scene. See OpenIG::Base::ImageGenerator::getScene

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Feb 19 2016
Parameters
view- view to init the scene, If NULL provided then default to view(0)
void OpenIG::Engine::initSplashScreen ( )
protected

Init the splash screen.

Init the splash screen. It looks for OpenIG-Splash.jpg in, for Windows in /igdata Linux and MacOS in /usr/local/bin/igdata

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
void OpenIG::Engine::initTerminal ( )
protected

Peforms init on the onscreen command line terminal.

Peforms init on the onscreen command line terminal. It is bound to F8

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
virtual void OpenIG::Engine::initView ( osgViewer::View *  view,
ViewType  options = OTW 
)
virtual

Setup a View with OpenIG.

This is to let the user setup a View with OpenIG dynamicaly if not set with

See also
init
Parameters
viewYour View.
optionThe View option, OTW, EO, IR ... probably will be extending
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sat Feb 20 2016
void OpenIG::Engine::initViewer ( osgViewer::CompositeViewer *  viewer,
const ViewIdentifiers ids = ViewIdentifiers() 
)
protected

Init the viewer. It calls initScene and add the ViewerOperation for managing the Entity maps. See OpenIG::Base::ImageGenerator::addEntity.

Parameters
viewerInstance of osgViewer::CompositeViewer
idsList of Views to which we let OpenIG render. If empty it will use all the Views with no SceneData associated
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
virtual bool OpenIG::Engine::isCameraBoundToEntity ( unsigned int  cameraID = 0)
virtual

Checks if the Camera is bound to an Entity.

Checks if the Camera is bound to an Entity

Returns
true if it is bounds, false otherwise
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

bool OpenIG::Engine::isFileCached ( const std::string &  fileName)

Returns true if the given file is using the file cache.

Returns
Returns true if the given file is using the file cache
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sat Jun 27 2015
virtual bool OpenIG::Engine::isLightEnabled ( unsigned int  id)
virtual

Test if a light is enabled.

Test if a light is enabled. See addLight for more infor about lights IDs and their management.

Parameters
idThe ID of the light
Returns
true if the light is enabled, see enableLight, false otherwise
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::loadCloudLayerFile ( unsigned int  id,
int  type,
std::string  filename 
)
virtual

Manipulates cloud layers using saved cloudlayer files from SilverLinings API. The openig::OpenIG is not implementing this instead it uses igplugincore::PluginContext::Attribute to pass commands to all the plugins that might deal with such atmospheric effects. See loadCloudLayer for more info.

Parameters
idThe id of the cloud layer
filenameThe full path to the filename of the cloudlayer
typeThe SL CloudType enum as integer
Author
Curtis Rubel openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Tue Aug 02 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::loadScript ( const std::string &  fileName)
virtual

Load a script with commands on startup.

Parameters
fileNameThe sctipt file name
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
virtual void OpenIG::Engine::playAnimation ( unsigned int  entityId,
const std::string &  animationName 
)
virtual

Plays animation on an Entity.

Plays animation on an Entity. At present it uses the internal simple animation handling

  • see OpenIG::Base::Animations. The future versions will have FBX support as well. The present animations are defined in a model XML file and there are plugins that can support the simple animation management implemented in this core. As a reference can be the ModelComposition plugin that is reading this XML defined animations and make all the necessary steps to crate the build-in animations from XML definitions. The reason to have it this way, is the need of controlling the animation via run-time value from code. The pre-baked animations are somewhat complicated to control based on some run-time value, so we were to implement our own management that is allowing us to control the players in the animations as we control Entity es, by a run-tome value, with a Matrix.
    Parameters
    entityIdThe id of the Entity to play the animation
    animationNameThe name of the animation, as defined in the model XML or for future versions the hame of the FBX animation
    Author
    Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
    Date
    Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::playAnimation ( unsigned int  entityId,
const OpenIG::Base::StringUtils::StringList &  animations 
)
virtual

Plays multiple animations on an Entity at once.

Plays multiple animations on an Entity at once. For more info how the animations are supported pleas see OpenIG::Base::ImageGenerator::playAnimation

Parameters
entityIdThe id of the Entity to play the animations
animationsThe name of the animations, as defined in the model XML or for future versions the hame of the FBX animations
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::postRender ( )
virtual

override postRender method to be called from within a frame

Override postRender method to be called from within a frame. See frame for reference

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::preRender ( )
virtual

override preRender method to be called from within a frame

Override preRender method to be called from within a frame. See frame for reference

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::reloadEntity ( unsigned int  id,
const std::string &  fileName,
const osgDB::Options *  options = 0 
)
virtual

You might want to replace the model with another and preserve the id. See addEntity

Parameters
idThe id of the attached Entity. This is the id you have used with addEntity
fileNameThe file name of the model. Can be the same or new
optionsOptional. Some plugins can use the option string from the osgDB::Option object
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::removeAllCloudlayers ( )
virtual

Removes all cloud layers from the scene. The openig::OpenIG is not implementing this instead it uses OpenIG::PluginBase::PluginContext::Attribute to pass commands to all the plugins that might deal with such atmospheric effects. See addCloudLayer for more info.

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::removeCloudLayer ( unsigned int  id)
virtual

Removes a cloud layer from the scene.

Removes a cloud layer from the scene. The openig::OpenIG is not implementing this instead it uses OpenIG::PluginBase::PluginContext::Attribute to pass commands to all the plugins that might deal with such atmospheric effects. See addCloudLayer for more info

Parameters
idThe id of the clouds layer to be removed
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::removeCloudLayerFile ( unsigned int  id)
virtual

Removes a cloud layer file from the system.

Removes a cloud layer file from the system. The openig::OpenIG is not implementing this instead it uses OpenIG::PluginBase::PluginContext::Attribute to pass commands to all the plugins that might deal with such atmospheric effects. See addCloudLayer for more info

Parameters
idThe id of the clouds layer file to be removed, to ensure its also removed from the scene
filenameThe full path to the cloud file to be deleted
Author
Curtis Rubel openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Tue Nov 08 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::removeEffect ( unsigned int  id)
virtual

Removes effect from the scene.

Removes effect from the scene

Parameters
idUnique effect to the scene
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jun 14 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::removeEntity ( unsigned int  id)
virtual

Removes Entity from the scene.

Removes an entity from the scene. See addEntity immediatelly, still in the same frame though and it processed in ViewerOperation. When one inherits, it should maintain std::map of Entities available through getEntitiesToRemoveMap

Parameters
idThe id of the Entity. This is the id you have used with addEntity
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::removeLight ( unsigned int  id)
virtual

Removes light from the scene.

Removes light from the scene. See addLight for more info.

Parameters
idThe ID of the light to be removed
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::resetAnimation ( unsigned int  entityId,
const std::string &  animationName 
)
virtual

Reset the playback of animation.

Reset the playback of animation by name and Entity ID. It placed the players at their initial position before the playback. See playAnimation

Parameters
entityIdThe ID of the entity
animationNameThe name of the animation
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
MOn May 18 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::resetAnimation ( unsigned int  entityId,
const OpenIG::Base::StringUtils::StringList &  animations 
)
virtual

Reset the playback of multiple animations at once.

Reset the playback of multiple animations by their names and Entity ID. It places the players at their initial position before the playback. See playAnimation

Parameters
entityIdThe ID of the entity
animationsThe names of the animations
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
MOn May 18 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setCameraPosition ( const osg::Matrixd &  mx,
bool  viewMatrix = false,
unsigned int  cameraID = 0 
)
virtual

Set the position of the camera.

Sets the position of the camera using Matrix. If the camera is bind to an Entity, then this Matrix is the local offset. One can check if the camera is bound by isCameraBoundToEntity

Parameters
mxThe inital position of the camera. World coordinates
viewMatrixSet true if the provided Matrix is View Matrix
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setDate ( unsigned int  month,
int  day,
int  year 
)
virtual

Sets the simulation date.

Sets the simulation date. The core is not implementing this feature instead is creating OpenIG::Base::DateAttributes via igplugincore::PluginContext::Attribute and it is passing it to all the plugins to deal with.

Parameters
month
day
year
Author
Curtis G Rubel openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Wed May 25 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setEffectImplementationCallback ( OpenIG::Base::GenericImplementationCallback *  cb)
virtual

Sets the effect implementation callback.

The ImageGenerator, OpenIG only manages structures for the effects. It is up to plugins to provide their implementation. This is the callback that provides the effect implementation

Parameters
cbThe callback
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jun 14 2015
virtual void OpenIG::Engine::setEntityName ( unsigned int  id,
const std::string &  name 
)
virtual

Sets a name for an Entity.

Sets a name for an Entity. Can be handy for lookup

Parameters
idThe id of the attached Entity. This is the id you have used with addEntity
nameThe Entity name
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setFog ( double  visibility)
virtual

Sets fog in the scene.

Sets fog in the scene. The openig::OpenIG is adding a Fog attribute in the scene and it is up to plugins to implement it's appearance. Example is the LightingPlugin which computes the fog in a shader. Also, internaly openig::OpenIG is creating OpenIG::Base::FogAttributes via OpenIG::PluginBase::PluginContext::Attribute and passing it to all the plugins to deal with.

Parameters
visibilityVisibility in meters
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setLightImplementationCallback ( OpenIG::Base::LightImplementationCallback *  cb)
virtual

Sets the light implementation callback.

Sets the light implementation callback. openig::OpenIG is not implementing lights. It only manages some structures and it is up to plugins to give some lighting implementation. At the time of writing this, there are two that implements lighting in shaders: SimlpeLightingPlugin and LightingPlugin

Parameters
cbThe callback, expected to be implemented by a plugin
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
virtual void OpenIG::Engine::setLightUserData ( unsigned int  id,
osg::Referenced *  data 
)
virtual

Sets user data to a light created by a callback.

Sets user data to a light created by a callback

Parameters
idThe ID of the light.
dataUser data
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Tue May 17 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setRain ( double  factor)
virtual

Sets rain in the scene.

Sets rain in the scene. The openIG::OpenIG is not implementing but instead it creates OpenIG::Base::RainSnowAttributes via OpenIG::PluginBase::PluginContext::Attribute and it is passing it to all the plugins to deal with

Parameters
factorCan be anything, however some plugins that implements atmospheric effects like the SilverLiningPlugin is expecting this in the range of 0.0-1.0
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setReadFileCallback ( osgDB::Registry::ReadFileCallback *  cb)
virtual

Sets user ReadFileCallback.

Sets a user read file callback. Please avoid setting the ReadFileCallback when using OpenIG - it has internal one. Set it through this method if you have one, it will work together with the OpenIG internal one

Parameters
cbThe callback
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Thu Mar 17 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setReadNodeImplementationCallback ( ReadNodeImplementationCallback cb)
virtual

Sets the read node callback.

Sets the Read node callback. Some might want to change how the file is read, like osgEarth for example. You have an option to read files differently then with osgDB::readNodeFile(...)

Parameters
cbThe callback
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Mon Jun 16 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setSnow ( double  factor)
virtual

Sets snow in the scene.

Sets snow in the scene. The openIG::OpenIG is not implementing but instead it creates OpenIG::Base::RainSnowAttributes as OpenIG::PluginBase::PluginContext::Attribute and it is passing it to all the plugins to deal with

Parameters
factorCan be anything, however some plugins that implements atmospheric effects like the SilverLiningPlugin is expecting this in the range of 0.0-1.0
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::setTimeOfDay ( unsigned int  hour,
unsigned int  minutes 
)
virtual

Sets the time of day.

Sets the time of day. The core is not implementing this feature instead is creating OpenIG::Base::TimeOfDayAttributes via OpenIG::PluginBase::PluginContext::Attribute and it is passing it to all the plugins to deal with.

Parameters
hour
minutes
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

void OpenIG::Engine::setUpdateViewerCameraManipulator ( bool  update)

Sets to update any CameraMainpulator coming with the viewer on openig::OpenIG.

Parameters
updateif true updates it when it updates the Camera Position, false to ignore
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Fri Jan 16 2015
virtual void OpenIG::Engine::setupInitFlags ( unsigned int  mask)
virtual

Call this before.

See also
init. It will setup OpenIG
Parameters
Themask based on the
See also
SetupFlags
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
virtual void OpenIG::Engine::setViewType ( osgViewer::View *  view,
ViewType  options 
)
virtual

Setup the view option for a view.

Setup the view option for a view

Parameters
viewYour View.
optionThe View option, OTW, EO, IR ... probably will be extending
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sat Feb 27 2016
virtual void OpenIG::Engine::setWind ( float  speed,
float  direction = 0.f 
)
virtual

Sets wind in the scene.

Sets wind in the scene. The openIG::OpenIG is not implementing but instead it creates OpenIG::Base::RainSnowAttributes via OpenIG::PluginBase::PluginContext::Attribute and it is passing it to all the plugins to deal with

Parameters
speedSpeed of the wind. Can be anything or plugin specific. Good to mention here is that it might be expected by plugins to be in m/s/
directionThe direction. Can be anything or plugin specific. The SilverLiningPlugin is expecting this to be in degrees from North.
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::showEntity ( unsigned int  id,
bool  show 
)
virtual

Show/Hide Entity.

Show/Hide Entity

Parameters
idThe id of the Entity. This is the id you have used with addEntity
showIf true, the Entity will be present in the scene, if false it will not
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::stopAnimation ( unsigned int  entityId,
const std::string &  animationName 
)
virtual

Stops the playback of animation.

Stops the playback of animation by name and Entity ID. See playAnimation

Parameters
entityIdThe ID of the entity
animationNameThe name of the animation
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
MOn May 18 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::stopAnimation ( unsigned int  entityId,
const OpenIG::Base::StringUtils::StringList &  animations 
)
virtual

Stops the playback of animation.

Stops the playback of multiple animations by their names and Entity ID. See playAnimation

Parameters
entityIdThe ID of the entity
animationsThe names of the animations
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
MOn May 18 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::unbindCameraFromEntity ( unsigned int  cameraID = 0)
virtual

Unbinds the Camera from an Entity.

Unbinds the Camera from an Entity if it is already bound

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::unbindEffect ( unsigned int  id)
virtual

Unbinds effect to an Entity.

Unbinds effect to an Entity

Parameters
idUnique effect to the scene
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jun 14 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::unbindEntityFromCamera ( unsigned int  id)
virtual

Unbinds the Entity from a Camera.

Unbinds the Entity from the Camera if it is already bound

Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun May 02 2016

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::unbindFromEntity ( unsigned int  id)
virtual

Detach an Entity from its parent Entity.

Dettach an Entity from its parent Entity. Internaly the position and orientation is computed from local to world space on detach so the Entity stays on its current position and orientation

Parameters
idThe id of the attached Entity. This is the id you have used with addEntity
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::unbindLightFromcamera ( unsigned int  id)
virtual

Unbinds the light from a Camera.

Unbinds the light from a Camera, if bound. See bindLightToCamera

Parameters
idThe ID of the light
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::unbindLightFromEntity ( unsigned int  id)
virtual

Unbinds light from an Entity, if bound.

Unbinds light from an Entity, if bound. Please refer to addLight to get more info about lights ID and their management

Parameters
idThe ID of the light to be unbind
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::updateCloudLayer ( unsigned int  id,
double  altitude,
double  thickness,
double  density 
)
virtual

Update a cloud layer in the scene.

Updates a cloud layer in the scene with new values. The openig::OpenIG is not implementing this instead it uses OpenIG::PluginBase::PluginContext::Attribute to pass commands to all the plugins that might deal with such atmospheric effects. See addCloudLayer for more info

Parameters
idThe id of the cloud layer
altitudeAltitude of the cloud layer
thicknessThickness of the cloud layer
densityDensity of the cloud layer. This can be anything but some plugins that implement atmospheric effects like the SilverLiningPlugin are expecting this to be only in the range of 0.0-1.0
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::updateEffect ( unsigned int  id,
const osg::Matrixd &  mx 
)
virtual

Update effect with new position/orientation.

Update effect with new position/orientation

Parameters
idUnique effect to the scene
mxThe new position/orientation
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jun 14 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::updateEntity ( unsigned int  id,
const osg::Matrixd &  mx 
)
virtual

Updates Entity.

Updates Entity with new position and orientation by using a osg::Matrixd.

Parameters
idThe id of the Entity. This is the id you have used with addEntity
mxThe new position and orientation of the Entity. It is handy to use OpenIG::Base::Math methods to contruct this Matrix, as toMatrix(...)
Returns
Nothing
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::updateLight ( unsigned int  id,
const osg::Matrixd &  mx 
)
virtual

Updates a light in the scene.

Updates the light position and orientation in the scene. If bound to the Camera or Entity it is updating the local offset. You might want to use OpenIG::Base::Math to construct the needed Matrix for the update. See addLight for more info.

Parameters
idThe ID of the light.
mxNew position and orientation as Matrix
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.

virtual void OpenIG::Engine::updateLightAttributes ( unsigned int  id,
const OpenIG::Base::LightAttributes &  attribs 
)
virtual

Update lights attributes, like colors etc..

Updates light attributes via OpenIG::Base::LightAttributes . Once you set the new light attributes, be aware that you have to set the dirty mask there as well in order to have the update. Please see setLightImplementationCallback for more info about lights and their management

Parameters
idThe ID of the light you used with addLight
attribsThe new attributes
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015
virtual std::string OpenIG::Engine::version ( )
virtual

Gets the version.

Returns
The version
Author
Trajce Nikolov Nick openi.nosp@m.g@co.nosp@m.mpro..nosp@m.net
Date
Sun Jan 11 2015

Implements OpenIG::Base::ImageGenerator.


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