# gcu::Chem3dDoc Class Reference

`#include <gcu/chem3ddoc.h>`

Inheritance diagram for gcu::Chem3dDoc:

List of all members.

## Public Member Functions
| Chem3dDoc ()
| Chem3dDoc (Application *App, GLView *View)
virtual | ~Chem3dDoc ()
void | Draw ()
bool | IsEmpty ()
void | Load (char const *uri, char const *mime_type)
void | LoadData (char const *data, char const *mime_type)
const char * | GetTitle ()
void | OnExportVRML (string const &filename)
void | SetDisplay3D (Display3DMode val)
Display3DMode | GetDisplay3D (void)
Display3DMode & | GetRefDisplay3D (void)

## Detailed Description

Document class for a molecule. Embeds an OpenBabel::OBMol object.

Definition at line 58 of file chem3ddoc.h.

## Constructor & Destructor Documentation

gcu::Chem3dDoc::Chem3dDoc | ( |  | ) |

Default constructor

gcu::Chem3dDoc::Chem3dDoc | ( | Application * | App,
|  | GLView * | View |
| ) |  |  |

Parameters:

  | App | the application.
  | View,: | an optional already existing GLView instance.

virtual gcu::Chem3dDoc::~Chem3dDoc | ( |  | ) | `[virtual]`

Default destructor

## Member Function Documentation

void gcu::Chem3dDoc::Draw | ( |  | ) | `[virtual]`

Displays the molecule using OpenGL.

Implements gcu::GLDocument.

bool gcu::Chem3dDoc::IsEmpty | ( |  | ) | `[inline]`

Returns:
  true if the molecule have no atom, false otherwise.

Definition at line 83 of file chem3ddoc.h.

void gcu::Chem3dDoc::Load | ( | char const * | uri,
|  | char const * | mime_type |
| ) |  |  |

Parameters:

  | uri | the uri of the molecule file.
  | mime_type | the mime type of the molecule file.

Loads a molecule from the provided uri using OpenBabel.

void gcu::Chem3dDoc::LoadData | ( | char const * | data,
|  | char const * | mime_type |
| ) |  |  |

Parameters:

  | data | the inline data.
  | mime_type | the mime type of the data.

Loads a molecule from the provided data using OpenBabel.

const char* gcu::Chem3dDoc::GetTitle | ( |  | ) | `[inline]`

Returns:
  the title of the molecule if any.

Reimplemented from gcu::Document.

Definition at line 104 of file chem3ddoc.h.

void gcu::Chem3dDoc::OnExportVRML | ( | string const & | filename | ) |

Parameters:

  | filename | the name of the vrml file to which the data should be written.

Exports the embedded molecule as a vrml scene.

gcu::Chem3dDoc::SetDisplay3D | ( | Display3DMode | mode | ) | `[inline]`

Parameters:

  | mode,: | the new mode.

Sets the display mode to one of the available Display3DMode values.

Definition at line 127 of file chem3ddoc.h.

gcu::Chem3dDoc::GetDisplay3D | ( | void |  | ) | `[inline]`

Returns:
  the current mode.

Definition at line 127 of file chem3ddoc.h.

gcu::Chem3dDoc::GetRefDisplay3D | ( | void |  | ) | `[inline]`

Returns:
  the current mode as a reference.

Definition at line 127 of file chem3ddoc.h.

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

- chem3ddoc.h