OBJ

class HPS.OBJ : public IDisposable

The OBJ class contains objects and enumerations used for importing OBJ files.

Public Functions

void Dispose ()
OBJ (HPS.OBJ in_that)
class ExportNotifier : public HPS.IONotifier

The ExportNotifier class is a smart-pointer that is associated with an asynchronous file export. It is used to interact with an ongoing export or get the results from a completed export.

Public Functions

void Assign (HPS.OBJ.ExportNotifier in_that)

Associate this ExportNotifier with the same file export as the source ExportNotifier.

Param in_that

The source ExportNotifier for the assignment.

override void Dispose ()
ExportNotifier ()

The default constructor creates an ExportNotifier object which is not associated with any file export.

ExportNotifier (HPS.IONotifier in_that)

The conversion constructor creates a new derived ExportNotifier object from a base IONotifier object. The copy will only be successful if the source notifier is really an upcast of this notifier type. Otherwise the copy will fail and the resulting ExportNotifier will be invalid.

Param in_that

The source IONotifier to copy.

ExportNotifier (HPS.OBJ.ExportNotifier in_that)

The copy constructor creates a new ExportNotifier object that is associated with the same file export as the source ExportNotifier.

Param in_that

The source ExportNotifier to copy.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

class File : public IDisposable

The File class provides functions to import and export OBJ files.

Public Functions

void Dispose ()
File (HPS.OBJ.File in_that)

Public Static Functions

HPS.OBJ.ExportNotifier Export (string in_file_name, HPS.KeyPath in_key_path_to_export)

Performs an asynchronous export of the specified key path to an OBJ file. May throw IOException in case of errors.

Param in_file_name

Name of OBJ file to export.

Param in_key_path_to_export

KeyPath from the segment where to start the export to the WindowKey. When using Sprocket, if you wish to export the Model, construct a SprocketPath and pass the KeyPath obtained from its GetKeyPath() method.

Return

An ExportNotfier object that can be used to query the export progress and status.

HPS.OBJ.ImportNotifier Import (string in_file_name, HPS.OBJ.ImportOptionsKit in_options)

Performs an asynchronous import of the specified OBJ file with the provided options. May throw an IOException prior to starting the asynchronous import.

Param in_file_name

Name of OBJ file to import.

Param in_options

Options controlling the import of the OBJ file (e.g., segment to import into).

Return

An ImportNotfier object that can be used to query the import progress and status.

class ImportNotifier : public HPS.IONotifier

The ImportNotifier class is a smart-pointer that is associated with an asynchronous file import. It is used to interact with an ongoing import or get the results from a completed import.

Public Functions

void Assign (HPS.OBJ.ImportNotifier in_that)

Associate this ImportNotifier with the same file import as the source ImportNotifier.

Param in_that

The source ImportNotifier for the assignment.

override void Dispose ()
HPS.OBJ.ImportResultsKit GetResults ()

Get the ImportResultsKit for the file import. Throws an IOException if the import is not complete or was not successful.

Return

The ImportResultsKit for a successful file import.

ImportNotifier ()

The default constructor creates an ImportNotifier object which is not associated with any file import.

ImportNotifier (HPS.IONotifier in_that)

The conversion constructor creates a new derived ImportNotifier object from a base IONotifier object. The copy will only be successful if the source notifier is really an upcast of this notifier type. Otherwise the copy will fail and the resulting ImportNotifier will be invalid.

Param in_that

The source IONotifier to copy.

ImportNotifier (HPS.OBJ.ImportNotifier in_that)

The copy constructor creates a new ImportNotifier object that is associated with the same file import as the source ImportNotifier.

Param in_that

The source ImportNotifier to copy.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

class ImportOptionsKit : public HPS.Kit

The ImportOptionsKit class contains any settings controlling the import of OBJ files.

Public Functions

override void Dispose ()
override bool Empty ()

Indicates whether this ImportOptionsKit has any values set on it.

Return

true if no values are set on this ImportOptionsKit, false otherwise.

bool Equals (HPS.OBJ.ImportOptionsKit in_kit)

Check if the source ImportOptionsKit is equivalent to this ImportOptionsKit.

Param in_kit

The source ImportOptionsKit to compare to this ImportOptionsKit.

Return

true if the objects are equivalent, false otherwise.

override bool Equals (Object obj)
override int GetHashCode ()
ImportOptionsKit ()

The default constructor creates an empty ImportOptionsKit object.

ImportOptionsKit (HPS.OBJ.ImportOptionsKit in_kit)

The copy constructor creates a new ImportOptionsKit object that contains the same settings as the source ImportOptionsKit.

Param in_kit

The source ImportOptionsKit to copy.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

void Set (HPS.OBJ.ImportOptionsKit in_kit)

Copies the source ImportOptionsKit into this ImportOptionsKit.

Param in_kit

The source ImportOptionsKit to copy.

HPS.OBJ.ImportOptionsKit SetHandedness (HPS.Drawing.Handedness in_handedness)

Sets the handedness used to import geometry by the OBJ importer. It should match the World Handedness for best results. Defaults to Right if not set.

Param in_handedness

The handedness used to import geometry.

Return

A reference to this ImportOptionsKit.

HPS.OBJ.ImportOptionsKit SetPortfolio (HPS.PortfolioKey in_portfolio)

Sets the portfolio which will be used when the importing images and textures. If no segment is specified, a portfolio will be created for this purpose during import.

Param in_portfolio

Portfolio that will be used when importing images and textures

Return

A reference to this ImportOptionsKit.

HPS.OBJ.ImportOptionsKit SetSegment (HPS.SegmentKey in_segment)

Sets the root segment where the OBJ data will be imported into. If no segment is specified, a root segment will be created for this purpose during import.

Param in_segment

Segment the OBJ data will be imported into.

Return

A reference to this ImportOptionsKit.

void Show (out HPS.OBJ.ImportOptionsKit out_kit)

Copies this ImportOptionsKit into the given ImportOptionsKit.

Param out_kit

The ImportOptionsKit to populate with the contents of this ImportOptionsKit.

bool ShowHandedness (out HPS.Drawing.Handedness out_handedness)

Shows the handedness used to import geometry.

Param out_handedness

Handedness used to import geometry.

Return

true if a handedness was specified, false otherwise.

bool ShowPortfolio (out HPS.PortfolioKey out_portfolio)

Shows the portfolio which will be used when importing images and textures.

Param out_portfolio

Portfolio that will be used when importing images and textures.

Return

true if a portfolio was specified, false otherwise.

bool ShowSegment (out HPS.SegmentKey out_segment)

Shows the root segment where the OBJ data will be imported into.

Param out_segment

Segment the OBJ data will be imported into.

Return

true if a root segment was specified, false otherwise.

HPS.OBJ.ImportOptionsKit UnsetEverything ()

Removes all settings from this ImportOptionsKit.

Return

A reference to this ImportOptionsKit.

HPS.OBJ.ImportOptionsKit UnsetHandedness ()

Removes handedness information from this kit.

Return

A reference to this ImportOptionsKit.

HPS.OBJ.ImportOptionsKit UnsetPortfolio ()

Removes the portfolio which will be used when importing images and textures.

Return

A reference to this ImportOptionsKit.

HPS.OBJ.ImportOptionsKit UnsetSegment ()

Removes the root segment specifying where the OBJ data will be imported into.

Return

A reference to this ImportOptionsKit.

Public Static Functions

bool operator!= (HPS.OBJ.ImportOptionsKit a, HPS.OBJ.ImportOptionsKit b)
bool operator== (HPS.OBJ.ImportOptionsKit a, HPS.OBJ.ImportOptionsKit b)
class ImportResultsKit : public HPS.Kit

The ImportResultsKit class contains the results of a successful OBJ import.

Public Functions

override void Dispose ()
override bool Empty ()

Indicates whether this ImportResultsKit has any values set on it.

Return

true if no values are set on this ImportResultsKit, false otherwise.

bool Equals (HPS.OBJ.ImportResultsKit in_kit)

Check if the source ImportResultsKit is equivalent to this ImportResultsKit.

Param in_kit

The source ImportResultsKit to compare to this ImportResultsKit.

Return

true if the objects are equivalent, false otherwise.

override bool Equals (Object obj)
override int GetHashCode ()
ImportResultsKit ()

The default constructor creates an empty ImportResultsKit object.

ImportResultsKit (HPS.OBJ.ImportResultsKit in_kit)

The copy constructor creates a new ImportResultsKit object that contains the same settings as the source ImportResultsKit.

Param in_kit

The source ImportResultsKit to copy.

override HPS.Type ObjectType ()

This function returns the type the object, as declared (if the object is derived, this does not give the true type of the derived object).

Return

The declared type of the object in question, which may differ from the true, underlying type.

void Set (HPS.OBJ.ImportResultsKit in_kit)

Copies the source ImportResultsKit into this ImportResultsKit.

Param in_kit

The source ImportResultsKit to copy.

HPS.OBJ.ImportResultsKit SetHandedness (HPS.Drawing.Handedness in_handedness)

Sets the handedness used when importing geometry. This is really only used when generating an ImportResultsKit which is being returned to a user following an OBJ import.

Param in_handedness

Handedness used to import geometry.

Return

A reference to this ImportResultsKit.

HPS.OBJ.ImportResultsKit SetPortfolio (HPS.PortfolioKey in_portfolio)

Sets the portfolio which was used when the import file read in images and textures. This is really only used when generating an ImportResultsKit which is being returned to a user following an OBJ import.

Param in_portfolio

Portfolio that was used when the file imported images and textures.

Return

A reference to this ImportResultsKit.

HPS.OBJ.ImportResultsKit SetSegment (HPS.SegmentKey in_segment)

Sets the root segment which the OBJ data was imported into. This is really only used when generating an ImportResultsKit which is being returned to a user following an OBJ import.

Param in_segment

Segment the OBJ data was imported into.

Return

A reference to this ImportResultsKit.

void Show (out HPS.OBJ.ImportResultsKit out_kit)

Copies this ImportResultsKit into the given ImportResultsKit.

Param out_kit

The ImportResultsKit to populate with the contents of this ImportResultsKit.

bool ShowHandedness (out HPS.Drawing.Handedness out_handedness)

Shows handedness used to import geometry. This was either the root segment specified by the user in the ImportOptionsKit passed to OBJ.File.Import, or the root segment that was created for this purpose during import.

Param out_handedness

Segment the OBJ data was imported into.

Return

true if a handedness was specified, false otherwise.

bool ShowPortfolio (out HPS.PortfolioKey out_portfolio)

Shows the portfolio which was used when the import file read in images and textures. This was either the portfolio specified by the user in the ImportOptionsKit passed to OBJ.File.Import, or the portfolio that was created for this purpose during import.

Return

true if portfolio was specified, false otherwise.

bool ShowSegment (out HPS.SegmentKey out_segment)

Shows the root segment which the OBJ data was imported into. This was either the root segment specified by the user in the ImportOptionsKit passed to OBJ.File.Import, or the root segment that was created for this purpose during import.

Param out_segment

Segment the OBJ data was imported into.

Return

true if a root segment was specified, false otherwise.

HPS.OBJ.ImportResultsKit UnsetEverything ()

Removes all settings from this ImportResultsKit.

Return

A reference to this ImportResultsKit.

HPS.OBJ.ImportResultsKit UnsetHandedness ()

Removes the handedness used to import geometry. This is really only used when generating an ImportResultsKit which is being returned to a user following an OBJ import.

Return

A reference to this ImportResultsKit.

HPS.OBJ.ImportResultsKit UnsetPortfolio ()

Removes the portfolio which was used when the import file imported images and textures. This is really only used when generating an ImportResultsKit which is being returned to a user following an OBJ import.

Return

A reference to this ImportResultsKit.

HPS.OBJ.ImportResultsKit UnsetSegment ()

Removes the root segment which the OBJ data was imported into. This is really only used when generating an ImportResultsKit which is being returned to a user following an OBJ import.

Return

A reference to this ImportResultsKit.

Public Static Functions

bool operator!= (HPS.OBJ.ImportResultsKit a, HPS.OBJ.ImportResultsKit b)
bool operator== (HPS.OBJ.ImportResultsKit a, HPS.OBJ.ImportResultsKit b)