HIOUtilityObj

Functions

HIOUtilityObj

~HIOUtilityObj

char const *

GetOutputName

char const *

GetInputName

void

RegisterInputHandlerTypes

char const *

GetInputTypesString

HInputHandlerStyle

GetInputStyle

HFileIOResult

FileInputByKey

HFileIOResult

FileInputByKey

HFileIOResult

FileInputByKey

void

RegisterOutputHandlerTypes

HOutputHandlerStyle

GetOutputStyle

char const *

GetOutputTypesString

HFileIOResult

FileOutputByKey

HFileIOResult

FileOutputByKey

HFileIOResult

FileOutputByKey

Detailed Description

class HIOUtilityObj : public HInputHandler, public HOutputHandler

The HIOUtilityObj class reads and writes Alias|Wavefront files. See the following import/export notes and limitations.

The following notes apply to the exporter:

  The following geometry types are exported as face geometry
“shell,mesh,polygon,polycylinder,sphere,cylinder,ellipse,circle,circular chord,circular wedge,nurbs surface,grid”
   The following geometry types are exported as line geometry "polyline,line,nurbs curve,elliptical arc,circular arc"

   Markers are exported as points. Markers use line color.

   Line styles, edge styles, and marker styles are not supported.

   Geometry will be exported if its net visibility segment is "on". Geometry local visibilities have no effect.

   Modelling matrices above the segment you transform will not affect the output. If a user wants to achieve this effect,
he should create a dummy segment with the net ancestor matrix and include the segment he normally would have exported. Export this segment instead and delete it when done. The same applies for visibilities and colors.
   Include links are followed unless it is a conditional include with a false condition.

   Geometry references are supported.

   If exporting from a left-handed system, point X values will be negated.

   Textures and environment maps are supported for simple textures. Texture matrices are not supported.

   Ambient, diffuse, specular, and transmission colors are supported. If any of the latter three are set at the geometry
level, the exported geometry will have that color. Face-level color settings will not be exported.
   The exporter cannot handle holes defined by negative face counts in shell faces. These holes are ignored by the
exporter.

The following notes apply to the importer:

  If importing to a left-handed system, point X values will be negated.

  Importer no longer sets handedness to right, nor does it set a default color to white.

  Importer does not load line data.

Public Functions

inline HIOUtilityObj()

Constructs an HIOUtilityObj object.

inline virtual ~HIOUtilityObj()
inline virtual char const *GetOutputName()
Returns

A character pointer denoting the name of the handler.

inline virtual char const *GetInputName()
Returns

A character pointer denoting the name of the input handler.

inline virtual void RegisterInputHandlerTypes()

This method registers the “obj” extension to this handler as an input handler.

inline virtual char const *GetInputTypesString()
Returns

The input extension type that is handled by HIOUtilityObj which is “obj”.

inline virtual HInputHandlerStyle GetInputStyle()
Returns

The type of input style which is HInputHandlerStyleModel.

virtual HFileIOResult FileInputByKey(__wchar_t const *FileName, HC_KEY key, HInputHandlerOptions *options)

This method reads an Alias|Wavefront file. The file contents are mapped to a HOOPS shell primitive that is inserted into the HOOPS segment specified by the key.

Parameters
  • filename – The name of the file to load.

  • key – The HOOPS segment key to load model data into.

  • options – An options class containing any needed extra information for operation.

Returns

The #HFileInputResult result of the input operation.

inline virtual HFileIOResult FileInputByKey(char const *FileName, HC_KEY key, HInputHandlerOptions *options)

This method loads model data from a given file to a given HOOPS segment key. Note that this must be implemented in a subclassed HInputHandler instance handling models.

Parameters
  • filename – The name of the file to load.

  • key – The HOOPS segment key to load model data into.

  • options – An options class containing any needed extra information for the operation.

Returns

The #HFileInputResult result of the input operation.

inline virtual HFileIOResult FileInputByKey(unsigned short const *FileName, HC_KEY key, HInputHandlerOptions *options)

This method loads model data from a given file to a given HOOPS segment key. Note that this must be implemented in a subclassed HInputHandler instance handling models.

Parameters
  • filename – The UNICODE name of the file to load.

  • key – The HOOPS segment key to load model data into.

  • options – An options class containing any needed extra information for the operation.

Returns

The #HFileInputResult result of the input operation.

inline virtual void RegisterOutputHandlerTypes()

This method registers the “obj” and “OBJ” extensions to this handler as an output handler.

inline virtual HOutputHandlerStyle GetOutputStyle()
Returns

The type of output style which is HOutputHandlerStyleModel.

inline virtual char const *GetOutputTypesString()
Returns

The string of the type of output this handler creates which is “obj”.

virtual HFileIOResult FileOutputByKey(__wchar_t const *filename, HC_KEY key, HOutputHandlerOptions *options)

This method writes a Alias|Wavefront file out of the segment tree underneath the given key.

Parameters
  • filename – The name of the file to output.

  • key – The HOOPS segment key to output model data from.

  • options – The options class containing any needed extra information for the operation.

Returns

The #HFileOutputResult result of the output operation.

inline virtual HFileIOResult FileOutputByKey(unsigned short const *filename, HC_KEY key, HOutputHandlerOptions *options)

This method writes model data from a given HOOPS key to a given output file. Note that this must be implemented in a subclassed HOutputHandler instance handling models.

Parameters
  • filename – The wide character name of the file to output.

  • key – The HOOPS segment key to get output model data from.

  • options – The options class containing any needed extra information for the operation.

Returns

The #HFileOutputResult result of the output operation.

inline virtual HFileIOResult FileOutputByKey(char const *filename, HC_KEY key, HOutputHandlerOptions *options)

This method writes model data from a given HOOPS key to a given output file. Note that this must be implemented in a subclassed HOutputHandler instance handling models.

Parameters
  • filename – The name of the file to output.

  • key – The HOOPS segment key to output model data from.

  • options – The options class containing any needed extra information for the operation.

Returns

The #HFileOutputResult result of the output operation.