# WriteFile File Reference

`#include <osg/Image>`
`#include <osg/Shape>`
`#include <osg/Node>`
`#include <osgDB/Export>`
`#include <string>`

Include dependency graph for WriteFile:

This graph shows which files directly or indirectly include this file:

## Namespaces

namespace | osgDB

## Defines

#define | OSGDB_WRITEFILE 1

## Functions

OSGDB_EXPORT bool | writeObjectFile (const osg::Object &object, const std::string &filename)
| Write an osg::Object to file.
OSGDB_EXPORT bool | writeImageFile (const osg::Image &image, const std::string &filename)
| Write an osg::Image to file.
OSGDB_EXPORT bool | writeHeightFieldFile (const osg::HeightField &hf, const std::string &filename)
| Write an osg::HeightField to file.
OSGDB_EXPORT bool | writeNodeFile (const osg::Node &node, const std::string &filename)
| Write an osg::Node to file.

## Define Documentation

#define OSGDB_WRITEFILE 1

## Function Documentation

bool osgDB::writeHeightFieldFile | ( | const osg::HeightField & | hf,
|  | const std::string & | filename
| ) |

| Write an osg::HeightField to file. Return true on success, return false on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to write the specified file.

bool osgDB::writeImageFile | ( | const osg::Image & | image,
|  | const std::string & | filename
| ) |

| Write an osg::Image to file. Return true on success, return false on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to write the specified file.

bool osgDB::writeNodeFile | ( | const osg::Node & | node,
|  | const std::string & | filename
| ) |

| Write an osg::Node to file. Return true on success, return false on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to write the specified file.

bool osgDB::writeObjectFile | ( | const osg::Object & | object,
|  | const std::string & | filename
| ) |

| Write an osg::Object to file. Return true on success, return false on failure. The osgDB::Registry is used to load the appropriate ReaderWriter plugin for the filename extension, and this plugin then handles the request to write the specified file.