Defined Types



TQ3FileIdleMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3FileIdleMethod) (
    TQ3FileObject theFile,
    const void *idlerData
);

Discussion

Idle callback for reading/writing.

Parameter Descriptions
theFile
The file being process.
idlerData
Application-specific data.
function result
Success or failure of the operation.

TQ3XDataDeleteMethod


typedef Q3_CALLBACK_API_C (void, TQ3XDataDeleteMethod) (
    void *data
);

Discussion

Delete method.

Parameter Descriptions
delete
The data to delete.

TQ3XFFormatCanReadMethod


Returns whether the called FileFormat is able to read the given storage.
typedef Q3_CALLBACK_API_C (TQ3Boolean, TQ3XFFormatCanReadMethod) (
    TQ3StorageObject storage,
    TQ3ObjectType* theFileFormatFound
);

Discussion

This method is called for every subclass of kQ3FileFormatTypeReader from Q3File_OpenRead. Once found a FileFormat that returns something other than kQ3ObjectTypeInvalid in the theFileFormatFound parameter the search stops.

Parameter Descriptions
storage
Storage Object - positioned at zero - that contains the model to read.
theFileFormatFound
returns the signature of the FileFormat able to read this file or kQ3ObjectTypeInvalid.
function result
Success or failure of the operation.

TQ3XFFormatCloseMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatCloseMethod) (
    TQ3FileFormatObject format,
    TQ3Boolean abort
);

Discussion

Close method.

Parameter Descriptions
format
The format to close.
abort
Closing due to an abort.
function result
Success or failure of the callback.

TQ3XFFormatFloat32ReadArrayMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatFloat32ReadArrayMethod) (
    TQ3FileFormatObject format,
    TQ3Uns32 numFloats,
    TQ3Float32* data
);

Discussion

Read an array of 32-bit floats from a file.

Parameter Descriptions
format
The file format.
numFloats
The number of floats to read.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatFloat32ReadMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatFloat32ReadMethod) (
    TQ3FileFormatObject format,
    TQ3Float32* data
);

Discussion

Read a 32-bit float from a file.

Parameter Descriptions
format
The file format.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatFloat32WriteMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatFloat32WriteMethod) (
    TQ3FileFormatObject format,
    const TQ3Float32 *data
);

Discussion

Write a 32-bit float to a file.

Parameter Descriptions
format
The file format.
data
The data to write.
function result
Success or failure of the operation.

TQ3XFFormatFloat64ReadMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatFloat64ReadMethod) (
    TQ3FileFormatObject format,
    TQ3Float64* data
);

Discussion

Read a 64-bit float from a file.

Parameter Descriptions
format
The file format.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatFloat64WriteMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatFloat64WriteMethod) (
    TQ3FileFormatObject format,
    const TQ3Float64 *data
);

Discussion

Write a 64-bit float to a file.

Parameter Descriptions
format
The file format.
data
The data to write.
function result
Success or failure of the operation.

TQ3XFFormatGetFormatTypeMethod


typedef Q3_CALLBACK_API_C (TQ3FileMode, TQ3XFFormatGetFormatTypeMethod) (
    TQ3FileObject theFile
);

Discussion

Get the format type for a file.

Parameter Descriptions
theFile
The file to query.
function result
The file format.

TQ3XFFormatGetNextTypeMethod


typedef Q3_CALLBACK_API_C (TQ3ObjectType, TQ3XFFormatGetNextTypeMethod) (
    TQ3FileObject theFile
);

Discussion

Get the next type from a file.

Parameter Descriptions
theFile
The file to process.
function result
The next type in the file.

TQ3XFFormatInt16ReadArrayMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt16ReadArrayMethod) (
    TQ3FileFormatObject format,
    TQ3Uns32 numNums,
    TQ3Int16* data
);

Discussion

Read an array of 16-bit integers from a file.

Parameter Descriptions
format
The file format.
numNums
The number of numbers to read.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatInt16ReadMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt16ReadMethod) (
    TQ3FileFormatObject format,
    TQ3Int16* data
);

Discussion

Read a 16-bit integer from a file.

Parameter Descriptions
format
The file format.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatInt16WriteMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt16WriteMethod) (
    TQ3FileFormatObject format,
    const TQ3Int16 *data
);

Discussion

Write a 16-bit integer to a file.

Parameter Descriptions
format
The file format.
data
The data to write.
function result
Success or failure of the operation.

TQ3XFFormatInt32ReadArrayMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt32ReadArrayMethod) (
    TQ3FileFormatObject format,
    TQ3Uns32 numNums,
    TQ3Int32* data
);

Discussion

Read an array of 32-bit integers from a file.

Parameter Descriptions
format
The file format.
numNums
The number of numbers to read.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatInt32ReadMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt32ReadMethod) (
    TQ3FileFormatObject format,
    TQ3Int32* data
);

Discussion

Read a 32-bit integer from a file.

Parameter Descriptions
format
The file format.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatInt32WriteMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt32WriteMethod) (
    TQ3FileFormatObject format,
    const TQ3Int32 *data
);

Discussion

Write a 32-bit integer to a file.

Parameter Descriptions
format
The file format.
data
The data to write.
function result
Success or failure of the operation.

TQ3XFFormatInt64ReadMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt64ReadMethod) (
    TQ3FileFormatObject format,
    TQ3Int64* data
);

Discussion

Read a 64-bit integer from a file.

Parameter Descriptions
format
The file format.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatInt64WriteMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt64WriteMethod) (
    TQ3FileFormatObject format,
    const TQ3Int64 *data
);

Discussion

Write a 64-bit integer to a file.

Parameter Descriptions
format
The file format.
data
The data to write.
function result
Success or failure of the operation.

TQ3XFFormatInt8ReadArrayMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt8ReadArrayMethod) (
    TQ3FileFormatObject format,
    TQ3Uns32 numNums,
    TQ3Int8* data
);

Discussion

Read an array of 8-bit integers from a file.

Parameter Descriptions
format
The file format.
numNums
The number of numbers to read.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatInt8ReadMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt8ReadMethod) (
    TQ3FileFormatObject format,
    TQ3Int8* data
);

Discussion

Read an 8-bit integer from a file.

Parameter Descriptions
format
The file format.
data
Receives the data being read.
function result
Success or failure of the operation.

TQ3XFFormatInt8WriteMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatInt8WriteMethod) (
    TQ3FileFormatObject format,
    const TQ3Int8 *data
);

Discussion

Write a 8-bit integer to a file.

Parameter Descriptions
format
The file format.
data
The data to write.
function result
Success or failure of the operation.

TQ3XFFormatRawReadMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatRawReadMethod) (
    TQ3FileFormatObject format,
    unsigned char* data,
    TQ3Uns32 length
);

Discussion

Read a block of data from a file.

Parameter Descriptions
format
The file format.
data
Receives the data being read.
length
Receives the number of bytes read.
function result
Success or failure of the operation.

TQ3XFFormatRawWriteMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatRawWriteMethod) (
    TQ3FileFormatObject format,
    const unsigned char* data,
    TQ3Uns32 length
);

Discussion

Write a block of data to a file.

Parameter Descriptions
format
The file format.
data
The data to write.
length
The number of bytes to write.
function result
Success or failure of the operation.

TQ3XFFormatReadHeaderMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatReadHeaderMethod) (
    TQ3FileObject theFile
);

Discussion

Read the header from a file.

Parameter Descriptions
theFile
The file to process.
function result
Success or failure of the operation.

TQ3XFFormatReadObjectMethod


typedef Q3_CALLBACK_API_C (TQ3Object, TQ3XFFormatReadObjectMethod) (
    TQ3FileObject theFile
);

Discussion

Read an object from a file.

Parameter Descriptions
theFile
The file to process.
function result
Success or failure of the operation.

TQ3XFFormatSkipObjectMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatSkipObjectMethod) (
    TQ3FileObject theFile
);

Discussion

Skip an object in a file.

Parameter Descriptions
theFile
The file to process.
function result
Success or failure of the operation.

TQ3XFFormatStringReadMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatStringReadMethod) (
    TQ3FileFormatObject format,
    char* data,
    TQ3Uns32 *length
);

Discussion

Read a string from a file.

Parameter Descriptions
format
The file format.
data
Receives the data being read.
length
Receives the number of bytes read.
function result
Success or failure of the operation.

TQ3XFFormatStringWriteMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFFormatStringWriteMethod) (
    TQ3FileFormatObject format,
    const char* data
);

Discussion

Write a C-string to a file.

Parameter Descriptions
format
The file format.
data
The data to write.
function result
Success or failure of the operation.

TQ3XFileFormatSubmitObjectMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XFileFormatSubmitObjectMethod) (
    TQ3ViewObject theView,
    void *fileFormatPrivate,
    TQ3Object theObject,
    TQ3ObjectType objectType,
    const void *objectData
);

Discussion

Submit an object to a file.

Parameter Descriptions
theView
The view being submitted to.
fileFormatPrivate
File-format specific data.
theObject
The object to submit.
objectType
The type of theObject.
objectData
The data for theObject.
function result
Success or failure of the operation.

TQ3XObjectAttachMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XObjectAttachMethod) (
    TQ3Object childObject,
    TQ3Object parentObject
);

Discussion

Attach method.

Parameter Descriptions
childObject
The child object.
parentObject
The parent object.
function result
Success or failure of the callback.

TQ3XObjectReadDataMethod


Object method of type kQ3XMethodTypeObjectReadData for a custom element or attribute.
typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XObjectReadDataMethod) (
    TQ3Object parentObject,
    TQ3FileObject theFile
);

Discussion

The method normally reads the element's data using functions such as Q3Float32_Read and Q3File_ReadObject (for child objects), then adds the element data to its parent set.

Parameter Descriptions
parentObject
Set object to receive the new element or attribute.
theFile
A file object.
function result
Success or failure of the operation.

TQ3XObjectReadDefaultMethod


typedef Q3_CALLBACK_API_C (TQ3Object, TQ3XObjectReadDefaultMethod) (
    TQ3FileObject theFile
);

Discussion

Read method for default geometries (geometries represented with no data in 3DMF files).

This method is not available in QD3D.

Parameter Descriptions
theFile
A file object.
function result
The new default object.

TQ3XObjectReadMethod


typedef Q3_CALLBACK_API_C (TQ3Object, TQ3XObjectReadMethod) (
    TQ3FileObject theFile
);

Discussion

Read method.

Parameter Descriptions
theFile
The file to read.
function result
The object(s) read from the file.

TQ3XObjectTraverseDataMethod


typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XObjectTraverseDataMethod) (
    TQ3Object object,
    void *data,
    TQ3ViewObject view
);

Discussion

This is the custom object method of type kQ3XMethodTypeObjectTraverseData. The QuickDraw 3D documention mentions this method, but does not explain how it differs from TQ3XObjectTraverseMethod. Quesa does not use it.


TQ3XObjectTraverseMethod


Traversal method (kQ3XMethodTypeObjectTraverse) for a custom element or attribute.
typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XObjectTraverseMethod) (
    TQ3Object object,
    void *data,
    TQ3ViewObject view
);

Discussion

Writing of 3DMF data is done in two phases: traversal, which figures out which objects are to be written and how much space each will use, and the actual writing. Two phases are necessary because the start of a container includes the total length of the container, but this cannot be known without asking each member of the container.

Typically, this method will call Q3XView_SubmitWriteData to specify the immediate object data, and then call Q3Object_Submit for each child object.

Parameter Descriptions
object
The object to traverse.
data
The object's instance data. In the case of a custom element, this is the internal form of the element data.
view
A view object. result Success or failure of the operation.

TQ3XObjectWriteMethod


Object method of type kQ3XMethodTypeObjectWrite for a custom element or attribute.
typedef Q3_CALLBACK_API_C (TQ3Status, TQ3XObjectWriteMethod) (
    const void *data,
    TQ3FileObject theFile
);

Discussion

Writing of 3DMF data is done in two phases: traversal, which figures out which objects are to be written and how much space each will use, and the actual writing. Two phases are necessary because the start of a container includes the total length of the container, but this cannot be known without asking each member of the container.

This method will write the object's instance data using functions such as Q3Float32_Write. An class with no instance data other than child objects does not need to provide this method.

Parameter Descriptions
data
Instance data to write. This will be the data passed to Q3XView_SubmitWriteData by the traversal method.
theFile
A file object.
function result
Success or failure of the operation.

© 1999-2008 Quesa Developers (Last Updated 5/10/2008)