- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# src/obj_to_ps2icon.cpp File Reference

A tool for converting Wavefront OBJ to PS2 Icons. More...

`#include <iostream>`
`#include "../include/ps2_ps2icon.hpp"`
`#include "../include/obj_loader.hpp"`
`#include "../gbLib/include/gbException.hpp"`
`#include "../gbLib/include/gbImageLoader.hpp"`

## Functions
void | PrintHelp (char *self)
| Print a help text on screen.
void | ParseCommandLine (int argc, char *argv[])
| Parse the command line arguments and set globals accordingly.
OBJ_FileLoader * | LoadOBJFile ()
| Load the obj file.
void | ListOBJFile (OBJ_FileLoader const *obj_file)
| Print a list of all meshes contained in an obj file.
bool | IsBMP (char const *f)
| Helper function: Is f a path to a BMP file?
GhulbusUtil::gbImageLoader * | LoadTexture ()
| Load a texture file.
void | WriteOutputFile (OBJ_FileLoader const *obj_file, GhulbusUtil::gbImageLoader *img_loader)
| Write a PS2Icon file.
int | main (int argc, char *argv[])
## Variables
char const * | obj_input_file = NULL
| path to the input file
int | obj_mesh_index = 0
| 0-based index of the mesh to use
char const * | ps2_output_file = NULL
| path to the output file
char const * | texture_input_file = NULL
| path to the texture file (tga or bmp)
bool | verbose_output = false
| flag for verbose output
bool | list_obj_file = false
| flag for obj content listing
float | obj_scale_factor = 0.0f
| geometric scale factor for conversion

## Detailed Description

A tool for converting Wavefront OBJ to PS2 Icons.

Version:
  1.0

Author:
  Andreas Weis

## Function Documentation

void ListOBJFile | ( | OBJ_FileLoader const * | obj_file | ) |

Print a list of all meshes contained in an obj file.

Parameters:

  `[in]` | obj_file | Working loader to the file to list

void ParseCommandLine | ( | int | argc,
|  | char * | argv[] |
| ) |  |  |

Parse the command line arguments and set globals accordingly.

Parameters:

  `[in]` | argc | argc
  `[in]` | argv | argv

void PrintHelp | ( | char * | self | ) |

Print a help text on screen.

Parameters:

  `[in]` | self | Name of the executable (e.g. obtained from argv[0])