QuesaIO.h


Discussion

Declares the Quesa IO objects.

Functions


Q3Comment_Write


( TQ3Status ) Q3Comment_Write (
    char *comment,
    TQ3FileObject theFile
);
Discussion

Write a comment to a file.

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

Q3FileFormatClass_GetFormatNameString


( TQ3Status ) Q3FileFormatClass_GetFormatNameString (
    TQ3ObjectType formatClassType,
    TQ3ObjectClassNameString formatClassString
);
Discussion

Get the user-visible name of a file format.

The user visible name is suitable for display in a menu or window.

This function is not available in QD3D.

Parameter Descriptions
formatClassType
The class type of the file format to query.
formatClassString
Receives the name of the file format.
function result
Success or failure of the operation.

Q3FileFormat_GenericReadBinSwap_16


( TQ3Status ) Q3FileFormat_GenericReadBinSwap_16 (
    TQ3FileFormatObject format,
    TQ3Int16 *data
);
Discussion

Read and endian swap a TQ3Int16 from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadBinSwap_32


( TQ3Status ) Q3FileFormat_GenericReadBinSwap_32 (
    TQ3FileFormatObject format,
    TQ3Int32 *data
);
Discussion

Read and endian swap a TQ3Int32 from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadBinSwap_64


( TQ3Status ) Q3FileFormat_GenericReadBinSwap_64 (
    TQ3FileFormatObject format,
    TQ3Int64 *data
);
Discussion

Read and endian swap a TQ3Int64 from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadBinary_16


( TQ3Status ) Q3FileFormat_GenericReadBinary_16 (
    TQ3FileFormatObject format,
    TQ3Int16 *data
);
Discussion

Read a TQ3Int16 from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadBinary_32


( TQ3Status ) Q3FileFormat_GenericReadBinary_32 (
    TQ3FileFormatObject format,
    TQ3Int32 *data
);
Discussion

Read a TQ3Int32 from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadBinary_64


( TQ3Status ) Q3FileFormat_GenericReadBinary_64 (
    TQ3FileFormatObject format,
    TQ3Int64 *data
);
Discussion

Read a TQ3Int64 from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadBinary_8


( TQ3Status ) Q3FileFormat_GenericReadBinary_8 (
    TQ3FileFormatObject format,
    TQ3Int8 *data
);
Discussion

Read a TQ3Int8 from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadBinary_Raw


( TQ3Status ) Q3FileFormat_GenericReadBinary_Raw (
    TQ3FileFormatObject format,
    unsigned char *data,
    TQ3Uns32 length
);
Discussion

Read a block of data from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadBinary_String


( TQ3Status ) Q3FileFormat_GenericReadBinary_String (
    TQ3FileFormatObject format,
    char *data,
    TQ3Uns32 *length
);
Discussion

Read a string from a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericReadText_ReadUntilChars


( TQ3Status ) Q3FileFormat_GenericReadText_ReadUntilChars (
    TQ3FileFormatObject format,
    char *buffer,
    char *chars,
    TQ3Uns32 numChars,
    TQ3Boolean blanks,
    TQ3Int32 *foundChar,
    TQ3Uns32 maxLen,
    TQ3Uns32 *charsRead
);
Discussion

Read until characters have been found from a file format.

This function is not available in QD3D.

Parameter Descriptions
format
The file format to read with.
buffer
The buffer to read to.
chars
The list of "stop" characters.
numChars
The number of characters in chars.
blanks
Should reading stop on any characters < 0x20.
foundChar
The character which caused reading to stop.
maxLen
The maximum number of characters to read.
charsRead
Receives the number of characters read.
function result
Success or failure of the operation.

Q3FileFormat_GenericReadText_SkipBlanks


( TQ3Status ) Q3FileFormat_GenericReadText_SkipBlanks (
    TQ3FileFormatObject format
);
Discussion

Read and discard whitespace from a file format.

This function is not available in QD3D.

Parameter Descriptions
format
The file format to read with.
function result
Success or failure of the operation.

Q3FileFormat_GenericWriteBinSwap_16


( TQ3Status ) Q3FileFormat_GenericWriteBinSwap_16 (
    TQ3FileFormatObject format,
    const TQ3Int16 *data
);
Discussion

Endian swap and write a TQ3Int16 to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericWriteBinSwap_32


( TQ3Status ) Q3FileFormat_GenericWriteBinSwap_32 (
    TQ3FileFormatObject format,
    const TQ3Int32 *data
);
Discussion

Endian swap and write a TQ3Int32 to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericWriteBinSwap_64


( TQ3Status ) Q3FileFormat_GenericWriteBinSwap_64 (
    TQ3FileFormatObject format,
    const TQ3Int64 *data
);
Discussion

Endian swap and write a TQ3Int64 to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericWriteBinary_16


( TQ3Status ) Q3FileFormat_GenericWriteBinary_16 (
    TQ3FileFormatObject format,
    const TQ3Int16 *data
);
Discussion

Write a TQ3Int16 to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericWriteBinary_32


( TQ3Status ) Q3FileFormat_GenericWriteBinary_32 (
    TQ3FileFormatObject format,
    const TQ3Int32 *data
);
Discussion

Write a TQ3Int32 to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericWriteBinary_64


( TQ3Status ) Q3FileFormat_GenericWriteBinary_64 (
    TQ3FileFormatObject format,
    const TQ3Int64 *data
);
Discussion

Write a TQ3Int64 to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericWriteBinary_8


( TQ3Status ) Q3FileFormat_GenericWriteBinary_8 (
    TQ3FileFormatObject format,
    const TQ3Int8 *data
);
Discussion

Write a TQ3Int8 to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericWriteBinary_Raw


( TQ3Status ) Q3FileFormat_GenericWriteBinary_Raw (
    TQ3FileFormatObject format,
    const unsigned char *data,
    TQ3Uns32 length
);
Discussion

Write a block of data to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GenericWriteBinary_String


( TQ3Status ) Q3FileFormat_GenericWriteBinary_String (
    TQ3FileFormatObject format,
    const char *data,
    TQ3Uns32 *length
);
Discussion

Write a string to a file format.

This function is not available in QD3D.

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

Q3FileFormat_GetConfigurationData


( TQ3Status ) Q3FileFormat_GetConfigurationData (
    TQ3FileFormatObject format,
    unsigned char *dataBuffer,
    TQ3Uns32 bufferSize,
    TQ3Uns32 *actualDataSize
);
Discussion

Get the configuration data for a file format.

Configuration data should be saved by the application in a manner appropriate for the current platform (e.g., the Registry on Windows or a .plist file on the Mac), tagging it with the file format's type for later identification.

If dataBuffer is NULL, the size of data required to store the configuration data will be returned in actualDataSize.

Otherwise bufferSize should be set to the number of bytes pointed to by dataBuffer, and actualDataSize will receive the number of bytes written to dataBuffer.

This function is not available in QD3D.

Parameter Descriptions
format
The file format to query.
dataBuffer
Receives the file format configuration data. May be NULL.
bufferSize
The number of bytes pointed to by dataBuffer. May be 0.
actualDataSize
Receives the number of bytes required for, or written to, dataBuffer.

Q3FileFormat_GetType


( TQ3ObjectType ) Q3FileFormat_GetType (
    TQ3FileFormatObject format
);
Discussion

Get the type of a file format.

This function is not available in QD3D.

Parameter Descriptions
format
The file format to query.
function result
The type of the file format.

Q3FileFormat_HasModalConfigure


( TQ3Boolean ) Q3FileFormat_HasModalConfigure (
    TQ3FileFormatObject format
);
Discussion

Does a file format have a modal configure dialog?

This function is not available in QD3D.

Parameter Descriptions
format
The file format to query.
function result
Does the file format have a modal configure dialog?

Q3FileFormat_ModalConfigure


( TQ3Status ) Q3FileFormat_ModalConfigure (
    TQ3FileFormatObject format,
    TQ3DialogAnchor dialogAnchor,
    TQ3Boolean *canceled
);
Discussion

Invoke a file format's modal configure dialog.

If the file format provides a user interface for adjusting its preferences, a modal configure dialog can be displayed by this function.

The cancel/accept state of the dialog is returned through the cancelled parameter.

After a configure dialog has been accepted, the current preferences should be retrieved with Q3FileFormat_GetConfigurationData and stored by the application for later recall.

This function is not available in QD3D.

Parameter Descriptions
format
The file format whose configure dialog is to be displayed.
dialogAnchor
Platform-specific dialog data.
cancelled
Receives the OK/Cancel state of the dialog.
function result
Success or failure of the operation.

Q3FileFormat_NewFromType


( TQ3FileFormatObject ) Q3FileFormat_NewFromType (
    TQ3ObjectType fformatObjectType
);
Discussion

Create a new file format object.

This function is not available in QD3D.

Parameter Descriptions
fformatObjectType
The type of the file format.
function result
The new file format object.

Q3FileFormat_SetConfigurationData


( TQ3Status ) Q3FileFormat_SetConfigurationData (
    TQ3RendererObject format,
    unsigned char *dataBuffer,
    TQ3Uns32 bufferSize
);
Discussion

Set the configuration data for a file format.

The configuration must have been obtained with a previous call to Q3FileFormat_GetConfigurationData.

This function is not available in QD3D.

Parameter Descriptions
format
The file format to update.
dataBuffer
The configuration data for the file format.
bufferSize
The number of bytes pointed to by dataBuffer.
function result
Success or failure of the operation.

Q3File_Cancel


( TQ3Status ) Q3File_Cancel (
    TQ3FileObject theFile
);
Discussion

Cancel a read/write operation on a file.

Parameter Descriptions
theFile
The file to cancel the current read/write operation for.
function result
Success or failure of the operation.

Q3File_Close


( TQ3Status ) Q3File_Close (
    TQ3FileObject theFile
);
Discussion

Close a file object.

When a file object is deleted (i.e., its last reference is disposed), it is automatically closed, therefore you may not need to call Q3File_Close.

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

Q3File_GetExternalReferences


( TQ3GroupObject ) Q3File_GetExternalReferences (
    TQ3FileObject theFile
);
Discussion

Get the external references of a file.

Parameter Descriptions
theFile
The file to query.
function result
The external objects within the file.

Q3File_GetFileFormat


( TQ3FileFormatObject ) Q3File_GetFileFormat (
    TQ3FileObject theFile
);
Discussion

Get the file format used to process a file.

This function is not available in QD3D.

Parameter Descriptions
theFile
The file to query.
function result
The file format used to process the file.

Q3File_GetMode


( TQ3Status ) Q3File_GetMode (
    TQ3FileObject theFile,
    TQ3FileMode *mode
);
Discussion

Determine the mode of an open file object.

Parameter Descriptions
theFile
The file object.
mode
Receives the current mode mask.
function result
Success or failure of the operation.

Q3File_GetNextObjectType


( TQ3ObjectType ) Q3File_GetNextObjectType (
    TQ3FileObject theFile
);
Discussion

Get the type of the next object in a file.

Parameter Descriptions
theFile
The file to query.
function result
The type of the next object in the file.

Q3File_GetReadInGroup


( TQ3Status ) Q3File_GetReadInGroup (
    TQ3FileObject theFile,
    TQ3FileReadGroupState *readGroupState
);
Discussion

Get the group reading state for a file.

Parameter Descriptions
theFile
The file to query.
readGroupState
Receives the group reading state for the file.
function result
Success or failure of the operation.

Q3File_GetStorage


( TQ3Status ) Q3File_GetStorage (
    TQ3FileObject theFile,
    TQ3StorageObject *storage
);
Discussion

Get the storage object for a file.

Parameter Descriptions
theFile
The file to query.
storage
Receives the storage object for the file.
function result
Success or failure of the operation.

Q3File_GetVersion


( TQ3Status ) Q3File_GetVersion (
    TQ3FileObject theFile,
    TQ3FileVersion *version
);
Discussion

Get the file format version of an open file.

Parameter Descriptions
theFile
The file object.
version
Receives the file format version.
function result
Success or failure of the operation.

Q3File_IsEndOfContainer


( TQ3Boolean ) Q3File_IsEndOfContainer (
    TQ3FileObject theFile,
    TQ3Object rootObject
);
Discussion

Has the end of the current container in a file been reached?

Parameter Descriptions
theFile
The file to query.
rootObject
The root object in the container.
function result
Has the end of the container been reached?

Q3File_IsEndOfData


( TQ3Boolean ) Q3File_IsEndOfData (
    TQ3FileObject theFile
);
Discussion

Has the end of the data within a file been reached?

Parameter Descriptions
theFile
The file to query.
function result
Has the end of the data been reached?

Q3File_IsEndOfFile


( TQ3Boolean ) Q3File_IsEndOfFile (
    TQ3FileObject theFile
);
Discussion

Has the end of a file been reached?

Parameter Descriptions
theFile
The file to query.
function result
Has the end of the file been reached?

Q3File_IsNextObjectOfType


( TQ3Boolean ) Q3File_IsNextObjectOfType (
    TQ3FileObject theFile,
    TQ3ObjectType ofType
);
Discussion

Test the type of the next object in a file.

Parameter Descriptions
theFile
The file to query.
ofType
The type to compare against.
function result
Does the next object match the specified type?

Q3File_IsOpen


( TQ3Status ) Q3File_IsOpen (
    TQ3FileObject theFile,
    TQ3Boolean *isOpen
);
Discussion

Determines whether a file object is open.

Parameter Descriptions
theFile
The file object.
isOpen
Receives kQ3True if the file is open.
function result
Success or failure of the operation.

Q3File_MarkAsExternalReference


( TQ3Status ) Q3File_MarkAsExternalReference (
    TQ3FileObject theFile,
    TQ3SharedObject sharedObject
);
Discussion

Mark an object within a file as being an external reference.

Parameter Descriptions
theFile
The file to update.
sharedObject
The object to mark as external.
function result
Success or failure of the operation.

Q3File_New


( TQ3FileObject ) Q3File_New (void);
Discussion

Create a new file object.

function result
The new file object.

Q3File_OpenRead


( TQ3Status ) Q3File_OpenRead (
    TQ3FileObject theFile,
    TQ3FileMode *mode
);
Discussion

Open a file object for reading.

Associate a FileFormat object with the File

The file object must already have a storage object associated with it, and must not already be open.

Parameter Descriptions
theFile
The file object.
mode
Receives a combination of TQ3FileModeMasks values if the file is a 3DMF file, otherway it receives the choosed file format signature. Pass NULL if you don't need this information.
function result
Success or failure of the operation.

Q3File_OpenWrite


( TQ3Status ) Q3File_OpenWrite (
    TQ3FileObject theFile,
    TQ3FileMode mode
);
Discussion

Open a file object for writing.

The file object must have a storage object associated with it, and must not already be open.

Currently, Quesa ignores the mode parameter and writes in binary stream mode.

Parameter Descriptions
theFile
The file object.
mode
A combination of TQ3FileModeMasks values, or the file format class signature.
function result
Success or failure of the operation.

Q3File_ReadObject


( TQ3Object ) Q3File_ReadObject (
    TQ3FileObject theFile
);
Discussion

Read an object from a 3DMF file.

The file must already be open for reading. the typical usage of this function and any special requirements.

Parameter Descriptions
theFile
The file object.
function result
The new object, or NULL on failure.

Q3File_SetIdleMethod


( TQ3Status ) Q3File_SetIdleMethod (
    TQ3FileObject theFile,
    TQ3FileIdleMethod idle,
    const void *idleData
);
Discussion

Set the idle method for a file.

Parameter Descriptions
theFile
The file to update.
idle
The idle callback.
idleData
Application-specific data for the idle callback.
function result
Success or failure of the operation.

Q3File_SetReadInGroup


( TQ3Status ) Q3File_SetReadInGroup (
    TQ3FileObject theFile,
    TQ3FileReadGroupState readGroupState
);
Discussion

Set the group reading state for a file.

Parameter Descriptions
theFile
The file to update.
readGroupState
The new group reading state for the file.
function result
Success or failure of the operation.

Q3File_SetStorage


( TQ3Status ) Q3File_SetStorage (
    TQ3FileObject theFile,
    TQ3StorageObject storage
);
Discussion

Set the storage objectfor a file.

Parameter Descriptions
theFile
The file to query.
storage
The new storage object for the file.
function result
Success or failure of the operation.

Q3File_SkipObject


( TQ3Status ) Q3File_SkipObject (
    TQ3FileObject theFile
);
Discussion

Skip the next object in a file.

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

Q3Float32_Read


( TQ3Status ) Q3Float32_Read (
    TQ3Float32 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Float32 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Float32_ReadArray


( TQ3Status ) Q3Float32_ReadArray (
    TQ3Uns32 numFloats,
    TQ3Float32* floatArray,
    TQ3FileObject theFile
);
Discussion

Read an array of 32-bit floating point numbers from a file object.

Calling this function has somewhat less overhead than calling Q3Float32_Read repeatedly.

This function is not available in QD3D.

Parameter Descriptions
numFloats
Number of numbers to read.
floatArray
Address of array to receive the numbers.
theFile
A file object.
function result
Success or failure of the operation.

Q3Float32_Write


( TQ3Status ) Q3Float32_Write (
    TQ3Float32 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Float32 to a file.

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

Q3Float64_Read


( TQ3Status ) Q3Float64_Read (
    TQ3Float64 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Float64 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Float64_Write


( TQ3Status ) Q3Float64_Write (
    TQ3Float64 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Float64 to a file.

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

Q3Int16_Read


( TQ3Status ) Q3Int16_Read (
    TQ3Int16 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Int16 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Int16_Write


( TQ3Status ) Q3Int16_Write (
    TQ3Int16 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Int16 to a file.

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

Q3Int32_Read


( TQ3Status ) Q3Int32_Read (
    TQ3Int32 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Int32 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Int32_Write


( TQ3Status ) Q3Int32_Write (
    TQ3Int32 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Int32 to a file.

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

Q3Int64_Read


( TQ3Status ) Q3Int64_Read (
    TQ3Int64 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Int64 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Int64_Write


( TQ3Status ) Q3Int64_Write (
    TQ3Int64 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Int64 to a file.

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

Q3Int8_Read


( TQ3Status ) Q3Int8_Read (
    TQ3Int8 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Int8 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Int8_Write


( TQ3Status ) Q3Int8_Write (
    TQ3Int8 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Int8 to a file.

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

Q3Matrix4x4_Read


( TQ3Status ) Q3Matrix4x4_Read (
    TQ3Matrix4x4 *matrix4x4,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Matrix4x4 from a file.

Parameter Descriptions
matrix4x4
Receives the matrix read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3Matrix4x4_Write


( TQ3Status ) Q3Matrix4x4_Write (
    const TQ3Matrix4x4 *matrix4x4,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Matrix4x4 to a file.

Parameter Descriptions
matrix4x4
The matrix to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3NewLine_Write


( TQ3Status ) Q3NewLine_Write (
    TQ3FileObject theFile
);
Discussion

Write a newline to a file.

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

Q3Point2D_Read


( TQ3Status ) Q3Point2D_Read (
    TQ3Point2D *point2D,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Point2D from a file.

Parameter Descriptions
point2D
Receives the point read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3Point2D_Write


( TQ3Status ) Q3Point2D_Write (
    const TQ3Point2D *point2D,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Point2D to a file.

Parameter Descriptions
point2D
The point to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3Point3D_Read


( TQ3Status ) Q3Point3D_Read (
    TQ3Point3D *point3D,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Point3D from a file.

Parameter Descriptions
point3D
Receives the point read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3Point3D_Write


( TQ3Status ) Q3Point3D_Write (
    const TQ3Point3D *point3D,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Point3D to a file.

Parameter Descriptions
point3D
The point to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3RationalPoint3D_Read


( TQ3Status ) Q3RationalPoint3D_Read (
    TQ3RationalPoint3D *point3D,
    TQ3FileObject theFile
);
Discussion

Read a TQ3RationalPoint3D from a file.

Parameter Descriptions
point3D
Receives the point read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3RationalPoint3D_Write


( TQ3Status ) Q3RationalPoint3D_Write (
    const TQ3RationalPoint3D *point3D,
    TQ3FileObject theFile
);
Discussion

Write a TQ3RationalPoint3D to a file.

Parameter Descriptions
point3D
The point to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3RationalPoint4D_Read


( TQ3Status ) Q3RationalPoint4D_Read (
    TQ3RationalPoint4D *point4D,
    TQ3FileObject theFile
);
Discussion

Read a TQ3RationalPoint4D from a file.

Parameter Descriptions
point4D
Receives the point read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3RationalPoint4D_Write


( TQ3Status ) Q3RationalPoint4D_Write (
    const TQ3RationalPoint4D *point4D,
    TQ3FileObject theFile
);
Discussion

Write a TQ3RationalPoint4D to a file.

Parameter Descriptions
point4D
The point to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3RawData_Read


( TQ3Status ) Q3RawData_Read (
    unsigned char *data,
    TQ3Uns32 size,
    TQ3FileObject theFile
);
Discussion

Read a block of data from a file.

Parameter Descriptions
data
Receives the data read from the file.
size
The number of bytes to read.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3RawData_Write


( TQ3Status ) Q3RawData_Write (
    const unsigned char *data,
    TQ3Uns32 size,
    TQ3FileObject theFile
);
Discussion

Write a block of data to a file.

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

Q3Shared_ClearEditTracking


( TQ3Status ) Q3Shared_ClearEditTracking (
    TQ3SharedObject sharedObject
);
Discussion

Clear the edit tracking state of a shared object.

Parameter Descriptions
sharedObject
The shared object to update.
function result
Success or failure of the operation.

Q3Shared_GetEditTrackingState


( TQ3Boolean ) Q3Shared_GetEditTrackingState (
    TQ3SharedObject sharedObject
);
Discussion

Get the edit tracking state of a shared object.

Parameter Descriptions
sharedObject
The shared object to update.
function result
the current edit tracking state of the object.

Q3Size_Pad


( TQ3Size ) Q3Size_Pad (
    TQ3Size size
);
Discussion

Pad a number of bytes to be long-word aligned.

In other words, this rounds a number up to a multiple of 4.

Parameter Descriptions
size
An unsigned integer.
function result
Next multiple of 4.

Q3String_Read


( TQ3Status ) Q3String_Read (
    char *data,
    TQ3Uns32 *length,
    TQ3FileObject theFile
);
Discussion

Read a C string from a file.

Note that the length parameter is an output-only parameter. That is, this function does not know the size of your buffer, it simply assumes that you have allocated kQ3StringMaximumLength bytes.

If you pass NULL for the buffer, Q3String_Read will still find the length of the string, but will leave the file object's position at the beginning of the string.

If it reads a string of length at least kQ3StringMaximumLength, and you have passed a non-NULL buffer, then Quesa will post the warning kQ3WarningStringExceedsMaximumLength.

Parameter Descriptions
data
Buffer to receive string data, of size kQ3StringMaximumLength, or NULL.
length
Receives length in bytes of string data that was read, not including the terminating NUL character.
theFile
A file object.
function result
Success or failure of the operation.

Q3String_ReadUnlimited


( TQ3Status ) Q3String_ReadUnlimited (
    char *data,
    TQ3Uns32 *ioLength,
    TQ3FileObject theFile
);
Discussion

Read a NUL-terminated string (C string) from a file.

Unlike the QD3D function Q3String_Read, this function is not limited to reading at most kQ3StringMaximumLength bytes. Note that the length parameter is an input-output parameter.

If you pass NULL for the buffer, Q3String_ReadUnlimited will still find the length of the string, but will leave the file object's position at the beginning of the string. Therefore, you can read a string of unknown size as follows:


Q3String_Read( NULL, &stringSize, theFile );
stringSize += 1;	// make room for terminal NUL byte
buffer = Q3Memory_Allocate( stringSize );
Q3String_Read( buffer, &stringSize, theFile );


If you passed a non-NULL buffer that was not big enough for the whole string, Quesa posts kQ3WarningStringExceedsMaximumLength.

This function is not available in QD3D.

Parameter Descriptions
data
Buffer to receive string data, or NULL.
ioLength
Pass the size of your buffer. Receives the number of bytes of string data found in the file, not including the terminal NUL byte, even if it did not all fit in the buffer.
theFile
A file object.
function result
Success or failure of the operation.

Q3String_Write


( TQ3Status ) Q3String_Write (
    const char *data,
    TQ3FileObject theFile
);
Discussion

Write a NUL-terminated string (C string) to a file.

This writes a NUL-terminated string to a file, and if necessary writes up to 3 more pad bytes. If the string's length, including the terminal NUL byte, exceeds kQ3StringMaximumLength, then the error kQ3ErrorStringExceedsMaximumLength will be posted and kQ3StringMaximumLength bytes will be written.

Parameter Descriptions
data
A NUL-terminated string.
theFile
A file object.
function result
Success or failure of the operation.

Q3String_WriteUnlimited


( TQ3Status ) Q3String_WriteUnlimited (
    const char *data,
    TQ3FileObject theFile
);
Discussion

Write a NUL-terminated string (C string) to a file. If necessary it writes up to 3 more pad bytes to make the total number of bytes a multiple of 4.

This function is not available in QuickDraw 3D.

Parameter Descriptions
data
A NUL-terminated string.
theFile
A file object.
function result
Success or failure of the operation.

Q3Tangent2D_Read


( TQ3Status ) Q3Tangent2D_Read (
    TQ3Tangent2D *tangent2D,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Tangent2D from a file.

Parameter Descriptions
tangent2D
Receives the tangent read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3Tangent2D_Write


( TQ3Status ) Q3Tangent2D_Write (
    const TQ3Tangent2D *tangent2D,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Tangent2D to a file.

Parameter Descriptions
tangent2D
The tangent to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3Tangent3D_Read


( TQ3Status ) Q3Tangent3D_Read (
    TQ3Tangent3D *tangent3D,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Tangent3D from a file.

Parameter Descriptions
tangent3D
Receives the tangent read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3Tangent3D_Write


( TQ3Status ) Q3Tangent3D_Write (
    const TQ3Tangent3D *tangent3D,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Tangent3D to a file.

Parameter Descriptions
tangent3D
The tangent to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3UnknownBinary_EmptyData


( TQ3Status ) Q3UnknownBinary_EmptyData (
    TQ3UnknownBinaryData *unknownBinaryData
);
Discussion

Release the data of an unknown binary object.

Parameter Descriptions
unknownBinaryData
The binary data to release.
function result
Success or failure of the operation.

Q3UnknownBinary_EmptyTypeString


( TQ3Status ) Q3UnknownBinary_EmptyTypeString (
    char **typeString
);
Discussion

Release the type string of an unknown binary object.

Parameter Descriptions
typeString
The type string to release.
function result
Success or failure of the operation.

Q3UnknownBinary_GetData


( TQ3Status ) Q3UnknownBinary_GetData (
    TQ3UnknownObject unknownObject,
    TQ3UnknownBinaryData *unknownBinaryData
);
Discussion

Get the data from an unknown binary object.

Parameter Descriptions
unknownObject
The object to query.
unknownBinaryData
Receives the binary data from the object.
function result
Success or failure of the operation.

Q3UnknownBinary_GetTypeString


( TQ3Status ) Q3UnknownBinary_GetTypeString (
    TQ3UnknownObject unknownObject,
    char **typeString
);
Discussion

Get the type string of an unknown binary object.

Parameter Descriptions
unknownObject
The object to query.
typeString
Receives the type string from the object.
function result
Success or failure of the operation.

Q3UnknownText_EmptyData


( TQ3Status ) Q3UnknownText_EmptyData (
    TQ3UnknownTextData *unknownTextData
);
Discussion

Release the data of an unknown text object.

Parameter Descriptions
unknownTextData
The text data to release.
function result
Success or failure of the operation.

Q3UnknownText_GetData


( TQ3Status ) Q3UnknownText_GetData (
    TQ3UnknownObject unknownObject,
    TQ3UnknownTextData *unknownTextData
);
Discussion

Get the data from an unknown text object.

Parameter Descriptions
unknownObject
The object to query.
unknownTextData
Receives the text data from the object.
function result
Success or failure of the operation.

Q3Unknown_GetDirtyState


( TQ3Status ) Q3Unknown_GetDirtyState (
    TQ3UnknownObject unknownObject,
    TQ3Boolean *isDirty
);
Discussion

Get the dirty state of an unknown object.

Parameter Descriptions
unknownObject
The object to query.
isDirty
Receives the dirty state of the object.
function result
Success or failure of the operation.

Q3Unknown_GetType


( TQ3ObjectType ) Q3Unknown_GetType (
    TQ3UnknownObject unknownObject
);
Discussion

Get the type of an unknown object.

Parameter Descriptions
unknownObject
The object to query.
function result
The type of the object.

Q3Unknown_SetDirtyState


( TQ3Status ) Q3Unknown_SetDirtyState (
    TQ3UnknownObject unknownObject,
    TQ3Boolean isDirty
);
Discussion

Set the dirty state for an unknown object.

Parameter Descriptions
unknownObject
The object to update.
isDirty
The new dirty state of the object.
function result
Success or failure of the operation.

Q3Uns16_Read


( TQ3Status ) Q3Uns16_Read (
    TQ3Uns16 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Uns16 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Uns16_ReadArray


( TQ3Status ) Q3Uns16_ReadArray (
    TQ3Uns32 numNums,
    TQ3Uns16* intArray,
    TQ3FileObject theFile
);
Discussion

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

Calling this function has somewhat less overhead than calling Q3Uns16_Read repeatedly.

This function is not available in QD3D.

Parameter Descriptions
numNums
Number of numbers to read.
intArray
Address of array to receive the numbers.
theFile
A file object.
function result
Success or failure of the operation.

Q3Uns16_Write


( TQ3Status ) Q3Uns16_Write (
    TQ3Uns16 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Uns16 to a file.

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

Q3Uns32_Read


( TQ3Status ) Q3Uns32_Read (
    TQ3Uns32 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Uns32 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Uns32_ReadArray


( TQ3Status ) Q3Uns32_ReadArray (
    TQ3Uns32 numNums,
    TQ3Uns32* intArray,
    TQ3FileObject theFile
);
Discussion

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

Calling this function has somewhat less overhead than calling Q3Uns32_Read repeatedly.

This function is not available in QD3D.

Parameter Descriptions
numNums
Number of numbers to read.
intArray
Address of array to receive the numbers.
theFile
A file object.
function result
Success or failure of the operation.

Q3Uns32_Write


( TQ3Status ) Q3Uns32_Write (
    TQ3Uns32 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Uns32 to a file.

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

Q3Uns64_Read


( TQ3Status ) Q3Uns64_Read (
    TQ3Uns64 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Uns64 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.

Q3Uns64_Write


( TQ3Status ) Q3Uns64_Write (
    TQ3Uns64 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Uns64 to a file.

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

Q3Uns8_Read


( TQ3Status ) Q3Uns8_Read (
    TQ3Uns8 *data,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Uns8 from a file.

Parameter Descriptions
data
Receives the data read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3Uns8_ReadArray


( TQ3Status ) Q3Uns8_ReadArray (
    TQ3Uns32 numNums,
    TQ3Uns8* intArray,
    TQ3FileObject theFile
);
Discussion

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

Calling this function has somewhat less overhead than calling Q3Uns8_Read repeatedly.

This function is not available in QD3D.

Parameter Descriptions
numNums
Number of numbers to read.
intArray
Address of array to receive the numbers.
theFile
A file object.
function result
Success or failure of the operation.

Q3Uns8_Write


( TQ3Status ) Q3Uns8_Write (
    TQ3Uns8 data,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Uns8 to a file.

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

Q3Vector2D_Read


( TQ3Status ) Q3Vector2D_Read (
    TQ3Vector2D *vector2D,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Vector2D from a file.

Parameter Descriptions
vector2D
Receives the vector read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3Vector2D_Write


( TQ3Status ) Q3Vector2D_Write (
    const TQ3Vector2D *vector2D,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Vector2D to a file.

Parameter Descriptions
vector2D
The vector to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3Vector3D_Read


( TQ3Status ) Q3Vector3D_Read (
    TQ3Vector3D *vector3D,
    TQ3FileObject theFile
);
Discussion

Read a TQ3Vector3D from a file.

Parameter Descriptions
vector3D
Receives the vector read from the file.
theFile
The file to read from.
function result
Success or failure of the operation.

Q3Vector3D_Write


( TQ3Status ) Q3Vector3D_Write (
    const TQ3Vector3D *vector3D,
    TQ3FileObject theFile
);
Discussion

Write a TQ3Vector3D to a file.

Parameter Descriptions
vector3D
The vector to write to the file.
theFile
The file to write to.
function result
Success or failure of the operation.

Q3ViewHints_GetAttributeSet


( TQ3Status ) Q3ViewHints_GetAttributeSet (
    TQ3ViewHintsObject viewHints,
    TQ3AttributeSet *attributeSet
);
Discussion

Get the attribute set from a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
attributeSet
Receives the attribute set from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetCamera


( TQ3Status ) Q3ViewHints_GetCamera (
    TQ3ViewHintsObject viewHints,
    TQ3CameraObject *camera
);
Discussion

Get the camera from a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
camera
Receives the camera from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetClearImageColor


( TQ3Status ) Q3ViewHints_GetClearImageColor (
    TQ3ViewHintsObject viewHints,
    TQ3ColorARGB *color
);
Discussion

Get the clear image color from a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
color
Receives the clear image color from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetClearImageMethod


( TQ3Status ) Q3ViewHints_GetClearImageMethod (
    TQ3ViewHintsObject viewHints,
    TQ3DrawContextClearImageMethod *clearMethod
);
Discussion

Get the clear image method from a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
clearMethod
Receives the clear image method from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetDimensions


( TQ3Status ) Q3ViewHints_GetDimensions (
    TQ3ViewHintsObject viewHints,
    TQ3Uns32 *width,
    TQ3Uns32 *height
);
Discussion

Get the dimensions of a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
width
Receives the width from the view hints.
height
Receives the height from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetDimensionsState


( TQ3Status ) Q3ViewHints_GetDimensionsState (
    TQ3ViewHintsObject viewHints,
    TQ3Boolean *isValid
);
Discussion

Get the dimension state of a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
isValid
Receives the dimension state from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetLightGroup


( TQ3Status ) Q3ViewHints_GetLightGroup (
    TQ3ViewHintsObject viewHints,
    TQ3GroupObject *lightGroup
);
Discussion

Get the light group from a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
lightGroup
Receives the light group from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetMask


( TQ3Status ) Q3ViewHints_GetMask (
    TQ3ViewHintsObject viewHints,
    TQ3Bitmap *mask
);
Discussion

Get the mask from a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
mask
Receives the mask from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetMaskState


( TQ3Status ) Q3ViewHints_GetMaskState (
    TQ3ViewHintsObject viewHints,
    TQ3Boolean *isValid
);
Discussion

Get the mask state from a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
isValid
Receives the mask state from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_GetRenderer


( TQ3Status ) Q3ViewHints_GetRenderer (
    TQ3ViewHintsObject viewHints,
    TQ3RendererObject *renderer
);
Discussion

Get the renderer from a view hints object.

Parameter Descriptions
viewHints
The view hints to query.
renderer
Receives the renderer from the view hints.
function result
Success or failure of the operation.

Q3ViewHints_New


( TQ3ViewHintsObject ) Q3ViewHints_New (
    TQ3ViewObject view
);
Discussion

Create a new view hints object.

Parameter Descriptions
view
The view the view hints should be based on.
function result
The new view hints object.

Q3ViewHints_SetAttributeSet


( TQ3Status ) Q3ViewHints_SetAttributeSet (
    TQ3ViewHintsObject viewHints,
    TQ3AttributeSet attributeSet
);
Discussion

Set the attribute set for a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
attributeSet
The new attribute set for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetCamera


( TQ3Status ) Q3ViewHints_SetCamera (
    TQ3ViewHintsObject viewHints,
    TQ3CameraObject camera
);
Discussion

Set the camera for a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
camera
The new camera for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetClearImageColor


( TQ3Status ) Q3ViewHints_SetClearImageColor (
    TQ3ViewHintsObject viewHints,
    const TQ3ColorARGB *color
);
Discussion

Set the clear image color of a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
color
The new clear image color for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetClearImageMethod


( TQ3Status ) Q3ViewHints_SetClearImageMethod (
    TQ3ViewHintsObject viewHints,
    TQ3DrawContextClearImageMethod clearMethod
);
Discussion

Set the clear image method of a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
clearMethod
The new clear image method for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetDimensions


( TQ3Status ) Q3ViewHints_SetDimensions (
    TQ3ViewHintsObject viewHints,
    TQ3Uns32 width,
    TQ3Uns32 height
);
Discussion

Set the dimensions of a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
width
The new width for the view hints.
height
The new height for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetDimensionsState


( TQ3Status ) Q3ViewHints_SetDimensionsState (
    TQ3ViewHintsObject viewHints,
    TQ3Boolean isValid
);
Discussion

Set the dimension state of a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
isValid
The new dimension state for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetLightGroup


( TQ3Status ) Q3ViewHints_SetLightGroup (
    TQ3ViewHintsObject viewHints,
    TQ3GroupObject lightGroup
);
Discussion

Set the light group for a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
lightGroup
The new light group for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetMask


( TQ3Status ) Q3ViewHints_SetMask (
    TQ3ViewHintsObject viewHints,
    const TQ3Bitmap *mask
);
Discussion

Set the mask of a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
mask
The new mask for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetMaskState


( TQ3Status ) Q3ViewHints_SetMaskState (
    TQ3ViewHintsObject viewHints,
    TQ3Boolean isValid
);
Discussion

Set the mask state of a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
isValid
The new mask state for the view hints.
function result
Success or failure of the operation.

Q3ViewHints_SetRenderer


( TQ3Status ) Q3ViewHints_SetRenderer (
    TQ3ViewHintsObject viewHints,
    TQ3RendererObject renderer
);
Discussion

Set the renderer for a view hints object.

Parameter Descriptions
viewHints
The view hints to update.
renderer
The new renderer for the view hints.
function result
Success or failure of the operation.

Q3View_EndWriting


( TQ3ViewStatus ) Q3View_EndWriting (
    TQ3ViewObject view
);
Discussion

End a writing loop.

Parameter Descriptions
view
The view to end writing to.
function result
Success or failure of the writing loop. Note that the result is a TQ3ViewStatus, not a TQ3Status.

Q3View_StartWriting


( TQ3Status ) Q3View_StartWriting (
    TQ3ViewObject view,
    TQ3FileObject theFile
);
Discussion

Start a writing loop.

Parameter Descriptions
view
The view to start writing to.
theFile
The file to start writing to.
function result
Success or failure of the operation.

Q3XView_SubmitSubObjectData


( TQ3Status ) Q3XView_SubmitSubObjectData (
    TQ3ViewObject view,
    TQ3XObjectClass objectClass,
    TQ3Uns32 size,
    void *data,
    TQ3XDataDeleteMethod deleteData
);
Discussion

Submit a sub-object to a view for writing.

Parameter Descriptions
view
The view being submitted to.
objectClass
The class of the object being submitted.
size
The number of bytes pointed to by data.
data
The data for the object.
deleteData
Delete callback to dispose of the data.
function result
Success or failure of the operation.

Q3XView_SubmitWriteData


( TQ3Status ) Q3XView_SubmitWriteData (
    TQ3ViewObject view,
    TQ3Size size,
    void *data,
    TQ3XDataDeleteMethod deleteData
);
Discussion

Submit data to a view for writing.

Parameter Descriptions
view
The view being submitted to.
size
The number of bytes pointed to by data.
data
The data to submit for writing.
deleteData
Delete callback to dispose of the data.
function result
Success or failure of the operation.

Typedefs


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.

Structs


TQ3FFormatBaseData


typedef struct TQ3FFormatBaseData {
    // Initialised by Quesa
    TQ3Uns32                                    baseDataVersion;
    TQ3StorageObject                            storage;
    TQ3Uns32                                    currentStoragePosition;
    TQ3Uns32                                    logicalEOF;
    // Initialised by the importer
    TQ3FileVersion                              fileVersion;
    TQ3Boolean                                  noMoreObjects;
    TQ3Endian                                   byteOrder;
    TQ3Boolean                                  readInGroup;
    TQ3Int32                                    groupDeepCounter;
    TQ3Uns32                                    *reserved1;
    TQ3Uns32                                    *reserved2;
    TQ3Uns32                                    *reserved3;
} TQ3FFormatBaseData;
Discussion

Common data for FileFormat objects.

This must be the first field in any derived structures.

The baseDataVersion, storage, currentStoragePosition, and logicalEOF fields are initialised automatically by Quesa. Remaining fields must be initialised by the importer.

Field Descriptions
baseDataVersion
The base data version.
storage
The storage object.
currentStoragePosition
The current position within the storage object.
logicalEOF
The number of bytes in the storage object.

TQ3UnknownBinaryData


typedef struct TQ3UnknownBinaryData {
    TQ3ObjectType                               objectType;
    TQ3Size                                     size;
    TQ3Endian                                   byteOrder;
    char                                        *contents;
} TQ3UnknownBinaryData;
Discussion

Unknown binary data.

Field Descriptions
objectType
The type of the object.
size
The size of the object data.
byteOrder
The byte order of the object data.
contents
The data for the object.

TQ3UnknownTextData


typedef struct TQ3UnknownTextData {
    char                                        *objectName;
    char                                        *contents;
} TQ3UnknownTextData;
Discussion

Unknown text data.

Field Descriptions
objectName
The name of the object.
contents
The data for the object.

Enumerations


TQ3FileModeMasks


typedef enum TQ3FileModeMasks {
    kQ3FileModeNormal                           = 0,
    kQ3FileModeStream                           = (1 << 0),
    kQ3FileModeDatabase                         = (1 << 1),
    kQ3FileModeText                             = (1 << 2),
    kQ3FileModeSwap                             = (1 << 3),
#endif
    kQ3FileModeSize32                           = 0xFFFFFFFF
} TQ3FileModeMasks;
Discussion

Mode masks for file operations.

Constants

kQ3FileModeNormal
Normal file mode.
kQ3FileModeStream
Stream mode.
kQ3FileModeDatabase
Database mode.
kQ3FileModeText
Text mode.
kQ3FileModeSwap
Binary mode with byte order swapped (not present in QD3D).

TQ3FileReadGroupStateMasks


typedef enum TQ3FileReadGroupStateMasks {
    kQ3FileReadWholeGroup                       = 0,
    kQ3FileReadObjectsInGroup                   = (1 << 0),
    kQ3FileCurrentlyInsideGroup                 = (1 << 1),
    kQ3FileReadGroupStateSize32                 = 0xFFFFFFFF
} TQ3FileReadGroupStateMasks;
Discussion

Read group state masks.

Constants

kQ3FileReadWholeGroup
Read the whole group.
kQ3FileReadObjectsInGroup
Read objects in the group.
kQ3FileCurrentlyInsideGroup
Currently inside a group.

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