# ac3d.cpp File Reference

`#include <stdio.h>`
`#include <malloc.h>`
`#include <math.h>`
`#include <osg/CullFace>`
`#include <osg/Geode>`
`#include <osg/Group>`
`#include <osg/Geometry>`
`#include <osg/Light>`
`#include <osg/LightSource>`
`#include <osg/Material>`
`#include <osg/Texture2D>`
`#include <osg/TexEnv>`
`#include <osg/StateSet>`
`#include <osg/Notify>`
`#include <osgDB/FileNameUtils>`
`#include <osgDB/Registry>`
`#include <osgDB/ReadFile>`
`#include <osgDB/FileUtils>`
`#include <osgUtil/Tesselator>`
`#include <osgUtil/SmoothingVisitor>`
`#include "osgac3d.h"`
`#include "Exception.h"`
`#include "Geode.h"`

Include dependency graph for ac3d.cpp:

## Functions

osg::Material * | ac_palette_get_material (const unsigned int id)
Boolean | read_line (std::istream &fin)
Prototype int | get_tokens (char *s, int *argc, char *argv[])
| bung '' chars at the end of tokens and set up the array (tokv) and count (tokc) like argv argc *
void | initobject (ACObject *ob)
void | init_surface (ACSurface *s)
void | osgtri_calc_normal (osg::Vec3 &v1, osg::Vec3 &v2, osg::Vec3 &v3, osg::Vec3 &n)
ACSurface * | read_surface (std::istream &f, ACSurface *s, osg::UShortArray *nusidx, osg::Vec2Array *tcs)
int | string_to_objecttype (char *s)
void | protate (osg::Vec3 p, float m[9])
osg::Group * | ac_load_object (std::istream &f, const ACObject *parent, const osgDB::ReaderWriter::Options *options)
osg::Group * | ac_load_ac3d (const char *fname, const osgDB::ReaderWriter::Options *options)
void | ac_dump (ACObject *ob)

## Variables

int | tokc = 0
char * | tokv [30]
osgDB::RegisterReaderWriterProxy< ReaderWriterAC > | g_readerWriter_AC_Proxy

## Function Documentation

void ac_dump | ( | ACObject * | ob | ) |

osg::Group* ac_load_ac3d | ( | const char * | fname,
|  | const osgDB::ReaderWriter::Options * | options
| ) |

osg::Group* ac_load_object | ( | std::istream & | f,
|  | const ACObject * | parent,
|  | const osgDB::ReaderWriter::Options * | options
| ) |

| calc surface normal * 'kids' is the last token in an object *

osg::Material* ac_palette_get_material | ( | const unsigned int | id | ) |

Prototype int get_tokens | ( | char * | s,
|  | int * | argc,
|  | char * | argv[]
| ) |

| bung '' chars at the end of tokens and set up the array (tokv) and count (tokc) like argv argc *

void init_surface | ( | ACSurface * | s | ) |

void initobject | ( | ACObject * | ob | ) |

void osgtri_calc_normal | ( | osg::Vec3 & | v1,
|  | osg::Vec3 & | v2,
|  | osg::Vec3 & | v3,
|  | osg::Vec3 & | n
| ) |

void protate | ( | osg::Vec3 | p,
|  | float | m[9]
| ) |

Boolean read_line | ( | std::istream & | fin | ) |

ACSurface* read_surface | ( | std::istream & | f,
|  | ACSurface * | s,
|  | osg::UShortArray * | nusidx,
|  | osg::Vec2Array * | tcs
| ) |

int string_to_objecttype | ( | char * | s | ) |

## Variable Documentation

osgDB::RegisterReaderWriterProxy<ReaderWriterAC> g_readerWriter_AC_Proxy

int tokc = 0

char* tokv[30]