HGamer3D-Ogre-Binding-0.1.8: Library to enable 3D game development for Haskell - Ogre Bindings

Safe HaskellSafe-Infered

HGamer3D.Bindings.Ogre.ClassRoot

Synopsis

Documentation

newSource

Arguments

:: String

pluginFileName - The file that contains plugins information. Defaults to plugins.cfg, may be left blank to ignore.

-> String

configFileName - The file that contains the configuration to be loaded. Defaults to ogre.cfg, may be left blank to load nothing.

-> String

logFileName - The logfile to create, defaults to Ogre.log, may be left blank if you've already set up LogManager & Log yourself

-> IO HG3DClass 

Constructor

deleteSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance which is going to be deleted.

-> IO () 

Saves the details of the current configuration Stores details of the current configuration so it may be restored later on.

saveConfigSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Checks for saved videosoundetc settings This method checks to see if there is a valid saved configuration from a previous run. If there is, the state of the system will be restored to that configuration.If there is no saved configuration, or if the system failed with the last config settings, false

restoreConfigSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool

return value - If a valid configuration was found,

showConfigDialogSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool

return value - If the user clicked Ok,

Displays a dialog asking the user to choose system settings. This method displays the default dialog allowing the user to choose the rendering system, video mode etc. If there is are any settings saved already, they will be restored automatically before displaying the dialogue. When the user accepts a group of settings, this will automatically call Root::setRenderSystemRenderSystem::setConfigOptionRoot::saveConfigIf they clicked Cancel (in which case the app should strongly consider terminating), false

addRenderSystemSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

newRend

-> IO () 

Retrieve a pointer to the render system by the given name

Adds a new rendering subsystem to the list of available renderers. Intended for use by advanced users and plugin writers only! Calling this method with a pointer to a valid RenderSystem

getRenderSystemByNameSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name - Name of the render system intend to retrieve.

-> IO HG3DClass

return value - A pointer to the render system,

setRenderSystemSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

system - Pointer to the render system to use.

-> IO () 

Retrieve a pointer to the currently selected render system.

Sets the rendering subsystem to be used. This method indicates to OGRE which rendering system is to be used (e.g. Direct3D, OpenGL etc). This is called automatically by the default config dialog, and when settings are restored from a previous configuraion. If used manually it could be used to set the renderer from a custom settings dialog. Once this has been done, the renderer can be initialised using Root::initialiseThis method is also called by render systems if they are initialised directly. RenderSystem

getRenderSystemSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO HG3DClass 

initialiseSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

autoCreateWindow - If true, a rendering window will automatically be created (saving a call to Root::createRenderWindow). The window will be created based on the options currently set on the render system.

-> String

windowTitle

-> String

customCapabilitiesConfig

-> IO HG3DClass

return value - A pointer to the automatically created window, if requested, otherwise

Initialises the renderer. This method can only be called after a renderer has been selected with Root::setRenderSystem

isInitialisedSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Returns whether the system is initialised or not.

getRemoveRenderQueueStructuresOnClearSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

Get whether the entire render queue structure should be emptied on clearing, or whether just the objects themselves should be cleared.

setRemoveRenderQueueStructuresOnClearSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Bool

r

-> IO () 

Register a new SceneManagerFactoryPlugins should call this to register as new SceneManager

Set whether the entire render queue structure should be emptied on clearing, or whether just the objects themselves should be cleared.

addSceneManagerFactorySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

fact

-> IO () 

Unregister a SceneManagerFactory

removeSceneManagerFactorySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

fact

-> IO () 

Create a SceneManagerYou can use this method to create a SceneManagerThis method throws an exception if the named type is not found.

createSceneManagerSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

typeName - String identifying a unique SceneManager type

-> String

instanceName - Optional name to given the new instance that is created. If you leave this blank, an auto name will be assigned.

-> IO HG3DClass 

destroySceneManagerSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

sm

-> IO () 

Get an existing SceneManager

Destroy an instance of a SceneManager

getSceneManagerSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

instanceName - The name of the instance to retrieve.

-> IO HG3DClass 

hasSceneManagerSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

instanceName - The name of the instance to retrieve.

-> IO Bool 

Determines if a given SceneManager

getTextureManagerSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO HG3DClass 

Retrieves a reference to the current TextureManagerThis performs the same function as TextureManager::getSingletonNote that a TextureManagerOgreRenderSystemRoot::initialise

getMeshManagerSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO HG3DClass 

Retrieves a reference to the current MeshManagerThis performs the same function as MeshManager::getSingleton

getErrorDescriptionSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Int

errorNumber

-> IO String 

Utility function for getting a better description of an error code.

queueEndRenderingSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Starts / restarts the automatic rendering cycle. This method begins the automatic rendering of the scene. It will NOTDuring rendering, any FrameListener classes registered using addFrameListener will be called back for each frame that is to be rendered, These classes can tell OGRE to halt the rendering if required, which will cause this method to return. RenderTarget::updateRoot::renderOneFrame This frees up the CPU to do other things in between refreshes, since in this case frame rate is less important. This method can only be called after Root::initialise

Queues the end of rendering. This method will do nothing unless startRendering()RootRoot::startRendering

startRenderingSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Render one frame. Updates all the render targets automatically and then returns, raising frame events before and after.

renderOneFrameSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Bool 

renderOneFrame2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

timeSinceLastFrame

-> IO Bool 

Render one frame, with custom frame time information. Updates all the render targets automatically and then returns, raising frame events before and after - all per-frame times are based on the time value you pass in.

shutdownSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Adds a location to the list of searchable locations for a ResourceResourceLocations can be folders, compressed archives, even perhaps remote locations. Facilities for loading from different locations are provided by plugins which provide implementations of the ArchiveOgreYou can also supply the name of a resource group which should have this location applied to it. The ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAMEArchive

Shuts down the system manually. This is normally done by OgreOgre

addResourceLocationSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name - The name of the location, e.g. './data' or '/compressed/gamedata.zip'

-> String

locType - A string identifying the location type, e.g. FileSystem (for folders), Zip etc. Must map to a registered plugin which deals with this type (FileSystem and Zip should always be available)

-> String

groupName - Type of name of the resource group which this location should apply to; defaults to the General group which applies to all non-specific resources.

-> Bool

recursive - If the resource location has a concept of recursive directory traversal, enabling this option will mean you can load resources in subdirectories using only their unqualified name. The default is to disable this so that resources in subdirectories with the same name are still unique.

-> IO () 

Removes a resource location from the list. addResourceLocation

removeResourceLocationSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name - The name of the resource location as specified in addResourceLocation

-> String

groupName - The name of the resource group to which this location was assigned.

-> IO () 

Generates a packed data version of the passed in ColourValue suitable for use with the current RenderSystemSince different render systems have different colour data formats (eg RGBA for GL, ARGB for D3D) this method allows you to use 1 method for all.

convertColourValueSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Colour

colour - The colour to convert

-> IO Int

pDest - Pointer to location to put the result.

getAutoCreatedWindowSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO HG3DClass 

Retrieves a pointer to the window that was created automatically When Rootreturns a null pointer when Root

detachRenderTargetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

pWin

-> IO () 

Detaches a named RenderTarget

Detaches a RenderTarget

detachRenderTarget2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO () 

Destroys the given RenderTarget

destroyRenderTargetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

target

-> IO () 

Destroys the given named RenderTarget

destroyRenderTarget2Source

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO () 

Retrieves a pointer to the a named render window.

getRenderTargetSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name

-> IO HG3DClass 

loadPluginSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

pluginName - Name of the plugin library to load

-> IO () 

Manually unloads a Plugin contained in a DLL / DSO. Plugin DLLs are unloaded at shutdown automatically. This method allows you to unload plugins in code, but make sure their dependencies are decoupled first. This method will call the dllStopPlugin method defined in the DLL, which in turn should call Root::uninstallPlugin

Manually load a Plugin contained in a DLL / DSO. Plugins embedded in DLLs can be loaded at startup using the plugin configuration file specified when you create RootRoot::installPluginRoot::unloadPlugin

unloadPluginSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

pluginName - Name of the plugin library to unload

-> IO () 

Destroy a RenderQueueInvocationSequence. You must ensure that no Viewports are using this sequence.

destroyRenderQueueInvocationSequenceSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

name - The name to identify the sequence

-> IO () 

Destroy all RenderQueueInvocationSequences. You must ensure that no Viewports are using custom sequences.

destroyAllRenderQueueInvocationSequencesSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Clears the history of all event times. OGRE stores a history of the last few event times in order to smooth out any inaccuracies and temporary fluctuations. However, if you pause or don't render for a little while this can cause a lurch, so if you're resuming rendering after a break, call this method to reset the stored times

clearEventTimesSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO () 

Sets the period over which OGRE smooths out fluctuations in frame times. OGRE by default gives you the raw frame time, but can optionally smooths it out over several frames, in order to reduce the noticeable effect of occasional hiccups in framerate. These smoothed values are passed back as parameters to FrameListener calls. This method allow you to tweak the smoothing period, and is expressed in seconds. Setting it to 0 will result in completely unsmoothed frame times (the default).

setFrameSmoothingPeriodSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> Float

period

-> IO () 

Gets the period over which OGRE smooths out fluctuations in frame times.

getFrameSmoothingPeriodSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Float 

addMovableObjectFactorySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

fact - Pointer to the factory instance

-> Bool

overrideExisting - Set this to true to override any existing factories which are registered for the same type. You should only change this if you are very sure you know what you're doing.

-> IO () 

Removes a previously registered MovableObjectFactoryAll instances of objects created by this factory will be destroyed before removing the factory (by calling back the factories destroyInstance method). The plugin writer is responsible for actually destroying the factory.

Register a new MovableObjectFactoryMovableObjectPlugin creators can create subclasses of MovableObjectFactoryMovableObject

removeMovableObjectFactorySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> HG3DClass

fact

-> IO () 

Checks whether a factory is registered for a given MovableObject

hasMovableObjectFactorySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

typeName

-> IO Bool 

getMovableObjectFactorySource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> String

typeName

-> IO HG3DClass 

Get a MovableObjectFactory

getDisplayMonitorCountSource

Arguments

:: HG3DClass

classpointer - pointer of Class instance from which this methods is called.

-> IO Int 

Gets the number of display monitors.

getSingletonPtrSource

Arguments

:: IO HG3DClass 

Override standard Singleton retrieval. Why do we do this? Well, it's because the Singleton implementation is in a .h file, which means it gets compiled into anybody who includes it. This is needed for the Singleton template to work, but we actually only want it compiled into the implementation of the class based on the Singleton, not all of them. If we don't change this, we get link errors when trying to use the Singleton-based class from an outside dll. This method just delegates to the template version anyway, but the implementation stays in this single compilation unit, preventing link errors.