DI-Guy SDK Documentation  13.5
diguyGraphicsFile Class Reference

#include <diguyGraphicsFile.h>

Public Member Functions

Accessor Functions

The functions in this section provide access to data in this object.

They are designed to be called directly by DI-Guy programmers when needed.

All functions in this section are callable from:

  • C++
  • Script
const char * get_filename ()
 Returns the filename of the graphics file. More...
 
Virtual Functions

The functions in this section are all virtual functions that will be called by DI-Guy at various times during DI-Guy execution.

Because the functions are all virtual, DI-Guy programmers can create a subclass of this class and override them. Unless otherwise stated, the base class functions do not need to be called.

virtual int load (const char *filename, const char *extension)
 This function is called when the contents of a geometry file need to be loaded. More...
 
virtual int unload ()
 This function does anything necessary to unload assets created during the load() call. More...
 
virtual void * find_part (const char *part_name)
 This function needs to find and return an object representing a shape in the data loaded during the load() call. More...
 

Private Functions

The functions and variables past this point are for internal use only.

No external access to them is expected or necessary.

bdiGeometryFilem_scripted_object
 A pointer to internal data. More...
 
class bdiGeometryFactory
 
class bdiGeometryFile
 
bdiGeometryFileget_scripted_object ()
 
 diguyGraphicsFile (void *internal_data)
 A protected constructor. More...
 
virtual ~diguyGraphicsFile ()
 A protected destructor. More...
 

Constructor & Destructor Documentation

diguyGraphicsFile::diguyGraphicsFile ( void *  internal_data)
protected

A protected constructor.

Constructors are called automatically by DI-Guy.

virtual diguyGraphicsFile::~diguyGraphicsFile ( )
protectedvirtual

A protected destructor.

Destructors are called automatically by DI-Guy.

Member Function Documentation

const char* diguyGraphicsFile::get_filename ( )

Returns the filename of the graphics file.

This is the filename that was passed to load(). The filename may be NULL if load() has not been called.

Returns:

filename of the graphics file

virtual int diguyGraphicsFile::load ( const char *  filename,
const char *  extension 
)
virtual

This function is called when the contents of a geometry file need to be loaded.

DI-Guy Loader:

Implementations using the DI-Guy Loader usually do not override this function.

External Loader:

Implementations using an External Loader must override this function.

Parameters
filenamethe name of the geometry file that needs to be loaded
extensionthe extension (usually 3 characters) of the file; can help quickly choose an appropriate external loader

The filename argument includes the full path to the file to be loaded.

Callable From:

  • N/A (automatically called by DI-Guy Graphics API during the Build Stage)
virtual int diguyGraphicsFile::unload ( )
virtual

This function does anything necessary to unload assets created during the load() call.

It will be called after all meshes, states, etc., that were extracted from the file have been unloaded.

DI-Guy Loader:

Implementations using the DI-Guy Loader usually do not override this function.

External Loader:

Implementations using an External Loader must override this function.

Callable From:

  • N/A (automatically called by DI-Guy Graphics API during the Unbuild Stage)
virtual void* diguyGraphicsFile::find_part ( const char *  part_name)
virtual

This function needs to find and return an object representing a shape in the data loaded during the load() call.

Typically this is a group-type node above the meshes containing the geometry of the shape.

The returned object is not used directly by DI-Guy. Instead, it will be used in later calls to diguyGraphicsShape::get_diguy_graphics_file_part(), during the Build Stage.

Parameters
part_namethe name of the part that needs to be found

DI-Guy Loader:

Implementations using the DI-Guy Loader usually do not override this function.

External Loader:

Implementations using an External Loader must override this function.

Callable From:

  • N/A (automatically called by DI-Guy Graphics API during the Build Stage)
bdiGeometryFile* diguyGraphicsFile::get_scripted_object ( )
inline

Friends And Related Function Documentation

friend class bdiGeometryFactory
friend
friend class bdiGeometryFile
friend

Member Data Documentation

bdiGeometryFile* diguyGraphicsFile::m_scripted_object
private

A pointer to internal data.


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