Functions



Q3ColorARGB_Accumulate


( TQ3ColorARGB * ) Q3ColorARGB_Accumulate (
    const TQ3ColorARGB *src,
    TQ3ColorARGB *result
);
Discussion

Add a colour to an existing color.

The result is not clamped, and its components may increase past 1.0.

Available in inline form as Q3FastColorARGB_Accumulate.

This function is not available in QD3D.

Parameter Descriptions
src
The color to accumulate.
result
The color to accumulate into.
function result
Convenience pointer to the result.

Q3ColorARGB_Add


( TQ3ColorARGB * ) Q3ColorARGB_Add (
    const TQ3ColorARGB *c1,
    const TQ3ColorARGB *c2,
    TQ3ColorARGB *result
);
Discussion

Add c1 to c2.

Available in inline form as Q3FastColorARGB_Add.

This function is not available in QD3D.

Parameter Descriptions
c1
The first color.
c2
The second color.
result
Receives the sum of c1 and c2.
function result
Convenience pointer to the result.

Q3ColorARGB_Clamp


( TQ3ColorARGB * ) Q3ColorARGB_Clamp (
    const TQ3ColorARGB *color,
    TQ3ColorARGB *result
);
Discussion

Clamp the components of a color to within 0.0 to 1.0.

Available in inline form as Q3FastColorARGB_Clamp.

This function is not available in QD3D.

Parameter Descriptions
color
The color to clamp.
result
Receives the clamped color.
function result
Convenience pointer to the result.

Q3ColorARGB_Lerp


( TQ3ColorARGB * ) Q3ColorARGB_Lerp (
    const TQ3ColorARGB *first,
    const TQ3ColorARGB *last,
    float alpha,
    TQ3ColorARGB *result
);
Discussion

Linearly interpolate between two colors.

Available in inline form as Q3FastColorARGB_Lerp.

This function is not available in QD3D.

Parameter Descriptions
first
The first color.
last
The second color.
alpha
The blend factor to interpolate by.
result
Receives the interpolated color.
function result
Convenience pointer to the result.

Q3ColorARGB_Scale


( TQ3ColorARGB * ) Q3ColorARGB_Scale (
    const TQ3ColorARGB *color,
    float scale,
    TQ3ColorARGB *result
);
Discussion

Scale a color.

Available in inline form as Q3FastColorARGB_Scale.

This function is not available in QD3D.

Parameter Descriptions
color
The color to scale.
scale
The factor to scale by.
result
Receives the scaled color.
function result
Convenience pointer to the result.

Q3ColorARGB_Set


( TQ3ColorARGB * ) Q3ColorARGB_Set (
    TQ3ColorARGB *color,
    float a,
    float r,
    float g,
    float b
);
Discussion

Set an ARGB color.

Available in inline form as Q3FastColorARGB_Set.

Parameter Descriptions
color
The color to set.
a
The alpha component for the color.
r
The red component for the color.
g
The green component for the color.
b
The blue component for the color.
function result
Convenience pointer to the result.

Q3ColorARGB_Subtract


( TQ3ColorARGB * ) Q3ColorARGB_Subtract (
    const TQ3ColorARGB *c1,
    const TQ3ColorARGB *c2,
    TQ3ColorARGB *result
);
Discussion

Subtract c1 from c2.

Available in inline form as Q3FastColorARGB_Subtract.

This function is not available in QD3D.

Parameter Descriptions
c1
The first color.
c2
The second color.
result
Receives c2 minus c1.
function result
Convenience pointer to the result.

Q3ColorRGB_Accumulate


( TQ3ColorRGB * ) Q3ColorRGB_Accumulate (
    const TQ3ColorRGB *src,
    TQ3ColorRGB *result
);
Discussion

Add a colour to an existing color.

The result is not clamped, and its components may increase past 1.0.

Available in inline form as Q3FastColorRGB_Accumulate.

Parameter Descriptions
src
The color to accumulate.
result
The color to accumulate into.
function result
Convenience pointer to the result.

Q3ColorRGB_Add


( TQ3ColorRGB * ) Q3ColorRGB_Add (
    const TQ3ColorRGB *c1,
    const TQ3ColorRGB *c2,
    TQ3ColorRGB *result
);
Discussion

Add c1 to c2.

Available in inline form as Q3FastColorRGB_Add.

Parameter Descriptions
c1
The first color.
c2
The second color.
result
Receives the sum of c1 and c2.
function result
Convenience pointer to the result.

Q3ColorRGB_Clamp


( TQ3ColorRGB * ) Q3ColorRGB_Clamp (
    const TQ3ColorRGB *color,
    TQ3ColorRGB *result
);
Discussion

Clamp the components of a color to within 0.0 to 1.0.

Available in inline form as Q3FastColorRGB_Clamp.

Parameter Descriptions
color
The color to clamp.
result
Receives the clamped color.
function result
Convenience pointer to the result.

Q3ColorRGB_Lerp


( TQ3ColorRGB * ) Q3ColorRGB_Lerp (
    const TQ3ColorRGB *first,
    const TQ3ColorRGB *last,
    float alpha,
    TQ3ColorRGB *result
);
Discussion

Linearly interpolate between two colors.

Available in inline form as Q3FastColorRGB_Lerp.

Parameter Descriptions
first
The first color.
last
The second color.
alpha
The blend factor to interpolate by.
result
Receives the interpolated color.
function result
Convenience pointer to the result.

Q3ColorRGB_Luminance


( float * ) Q3ColorRGB_Luminance (
    const TQ3ColorRGB *color,
    float *luminance
);
Discussion

Calculate the luminance of a color.

The luminance is calculated with the factors used by QD3D, i.e.,:

l = (r * 0.30078125f) + (g * 0.58984375f) + (b * 0.109375f)

Available in inline form as Q3FastColorRGB_Luminance.

Parameter Descriptions
color
The color whose luminance is to be calculated.
luminance
Receives the luminance value for the color.
function result
Convenience pointer to the result.

Q3ColorRGB_Scale


( TQ3ColorRGB * ) Q3ColorRGB_Scale (
    const TQ3ColorRGB *color,
    float scale,
    TQ3ColorRGB *result
);
Discussion

Scale a color.

Available in inline form as Q3FastColorRGB_Scale.

Parameter Descriptions
color
The color to scale.
scale
The factor to scale by.
result
Receives the scaled color.
function result
Convenience pointer to the result.

Q3ColorRGB_Set


( TQ3ColorRGB * ) Q3ColorRGB_Set (
    TQ3ColorRGB *color,
    float r,
    float g,
    float b
);
Discussion

Set an RGB color.

Available in inline form as Q3FastColorRGB_Set.

Parameter Descriptions
color
The color to set.
r
The red component for the color.
g
The green component for the color.
b
The blue component for the color.
function result
Convenience pointer to the result.

Q3ColorRGB_Subtract


( TQ3ColorRGB * ) Q3ColorRGB_Subtract (
    const TQ3ColorRGB *c1,
    const TQ3ColorRGB *c2,
    TQ3ColorRGB *result
);
Discussion

Subtract c1 from c2.

Available in inline form as Q3FastColorRGB_Subtract.

Parameter Descriptions
c1
The first color.
c2
The second color.
result
Receives c2 minus c1.
function result
Convenience pointer to the result.

Q3CompressedPixmapTexture_CompressImage


( TQ3Status ) Q3CompressedPixmapTexture_CompressImage (
    TQ3CompressedPixmap *compressedPixmap,
    PixMapHandle sourcePixMap,
    CodecType codecType,
    CodecComponent codecComponent,
    TQ3Int16 codedDepth,
    CodecQ codecQuality
);
Discussion

Create a compressed pixmap from a PixMapHandle.

This function is only available on platforms that support QuickTime.

Parameter Descriptions
compressedPixmap
Receives the compressed pixmap.
sourcePixMap
The uncompressed PixMapHandle.
codecType
The QuickTime codec to use for compression.
codecComponent
The QuickTime component to use for compression.
codedDepth
The depth the codec should compress to.
codecQuality
The quality the codec should compress to.
function result
Success or failure of the operation.

Q3CompressedPixmapTexture_GetCompressedPixmap


( TQ3Status ) Q3CompressedPixmapTexture_GetCompressedPixmap (
    TQ3TextureObject texture,
    TQ3CompressedPixmap *compressedPixmap
);
Discussion

Get the compressed pixmap from a compressed pixmap texture.

This function is only available on platforms that support QuickTime.

The reference counts of the returned compressedImage and imageDesc fields are incremented, and the caller must release their references when done.

Parameter Descriptions
texture
The texture to query.
compressedPixmap
Receives the compressed pixmap of the texture.
function result
Success or failure of the operation.

Q3CompressedPixmapTexture_New


( TQ3TextureObject ) Q3CompressedPixmapTexture_New (
    const TQ3CompressedPixmap *compressedPixmap
);
Discussion

Create a compressed pixmap texture.

This function is only available on platforms that support QuickTime.

Parameter Descriptions
compressedPixmap
The compressed pixmap for the texture.
function result
The new compressed pixmap texture.

Q3CompressedPixmapTexture_SetCompressedPixmap


( TQ3Status ) Q3CompressedPixmapTexture_SetCompressedPixmap (
    TQ3TextureObject texture,
    const TQ3CompressedPixmap *compressedPixmap
);
Discussion

Set the compressed pixmap for a compressed pixmap texture.

This function is only available on platforms that support QuickTime.

Parameter Descriptions
texture
The texture to update.
compressedPixmap
The new compressed pixmap for the texture.
function result
Success or failure of the operation.

Q3IlluminationShader_GetType


( TQ3ObjectType ) Q3IlluminationShader_GetType (
    TQ3ShaderObject shader
);
Discussion

Get the type of an illumination shader.

Parameter Descriptions
shader
The shader to query.
function result
The type of the illumination shader.

Q3LambertIllumination_New


( TQ3ShaderObject ) Q3LambertIllumination_New (void);
Discussion

Create a Lambert illumination shader.

function result
The new illumination shader.

Q3MipmapTexture_GetMipmap


( TQ3Status ) Q3MipmapTexture_GetMipmap (
    TQ3TextureObject texture,
    TQ3Mipmap *mipmap
);
Discussion

Get the mipmap from a mipmap texture.

The reference count of the returned image storage is incremented, and the caller must release their reference when done.

Parameter Descriptions
texture
The texture to query.
mipmap
Receives the mipmap of the texture.
function result
Success or failure of the operation.

Q3MipmapTexture_New


( TQ3TextureObject ) Q3MipmapTexture_New (
    const TQ3Mipmap *mipmap
);
Discussion

Create a mipmap texture.

Parameter Descriptions
mipmap
The mipmap to be used by the texture.
function result
The new mipmap texture.

Q3MipmapTexture_SetMipmap


( TQ3Status ) Q3MipmapTexture_SetMipmap (
    TQ3TextureObject texture,
    const TQ3Mipmap *mipmap
);
Discussion

Set the mipmap for a mipmap texture.

Parameter Descriptions
texture
The texture to update.
mipmap
The new mipmap for the texture.
function result
Success or failure of the operation.

Q3NULLIllumination_New


( TQ3ShaderObject ) Q3NULLIllumination_New (void);
Discussion

Create a NULL illumination shader.

function result
The new illumination shader.

Q3PhongIllumination_New


( TQ3ShaderObject ) Q3PhongIllumination_New (void);
Discussion

Create a Phong illumination shader.

function result
The new illumination shader.

Q3PixmapTexture_GetPixmap


( TQ3Status ) Q3PixmapTexture_GetPixmap (
    TQ3TextureObject texture,
    TQ3StoragePixmap *pixmap
);
Discussion

Get the pixmap from a pixmap texture.

The reference count of the returned image storage is incremented, and the caller must release their reference when done.

Parameter Descriptions
texture
The texture to query.
pixmap
Receives the pixmap of the texture.
function result
Success or failure of the operation.

Q3PixmapTexture_New


( TQ3TextureObject ) Q3PixmapTexture_New (
    const TQ3StoragePixmap *pixmap
);
Discussion

Create a pixmap texture.

Parameter Descriptions
pixmap
The pixmap to be used by the texture.
function result
The new pixmap texture.

Q3PixmapTexture_SetPixmap


( TQ3Status ) Q3PixmapTexture_SetPixmap (
    TQ3TextureObject texture,
    const TQ3StoragePixmap *pixmap
);
Discussion

Set the pixmap for a pixmap texture.

Parameter Descriptions
texture
The texture to update.
pixmap
The new pixmap for the texture.
function result
Success or failure of the operation.

Q3Shader_GetType


( TQ3ObjectType ) Q3Shader_GetType (
    TQ3ShaderObject shader
);
Discussion

Get the type of a shader object.

Parameter Descriptions
shader
The shader to query.
function result
The type of the shader.

Q3Shader_GetUBoundary


( TQ3Status ) Q3Shader_GetUBoundary (
    TQ3ShaderObject shader,
    TQ3ShaderUVBoundary *uBoundary
);
Discussion

Get the U boundary behaviour of a shader.

Parameter Descriptions
shader
The shader to query.
uBoundary
Receives the U boundary behaviour of the shader.
function result
Success or failure of the operation.

Q3Shader_GetUVTransform


( TQ3Status ) Q3Shader_GetUVTransform (
    TQ3ShaderObject shader,
    TQ3Matrix3x3 *uvTransform
);
Discussion

Get the UV transform for a shader.

Parameter Descriptions
shader
The shader to query.
uvTransform
Receives the UV transform of the shader.
function result
Success or failure of the operation.

Q3Shader_GetVBoundary


( TQ3Status ) Q3Shader_GetVBoundary (
    TQ3ShaderObject shader,
    TQ3ShaderUVBoundary *vBoundary
);
Discussion

Get the V boundary behaviour of a shader.

Parameter Descriptions
shader
The shader to query.
vBoundary
Receives the V boundary behaviour of the shader.
function result
Success or failure of the operation.

Q3Shader_SetUBoundary


( TQ3Status ) Q3Shader_SetUBoundary (
    TQ3ShaderObject shader,
    TQ3ShaderUVBoundary uBoundary
);
Discussion

Set the U boundary behaviour for a shader.

The initial U boundary behaviour for a shader is kQ3ShaderUVBoundaryWrap.

Parameter Descriptions
shader
The shader to update.
uBoundary
The U boundary behaviour for the shader.
function result
Success or failure of the operation.

Q3Shader_SetUVTransform


( TQ3Status ) Q3Shader_SetUVTransform (
    TQ3ShaderObject shader,
    const TQ3Matrix3x3 *uvTransform
);
Discussion

Set the UV transform for a shader.

Parameter Descriptions
shader
The shader to update.
uvTransform
The new UV transform for the shader.
function result
Success or failure of the operation.

Q3Shader_SetVBoundary


( TQ3Status ) Q3Shader_SetVBoundary (
    TQ3ShaderObject shader,
    TQ3ShaderUVBoundary vBoundary
);
Discussion

Set the V boundary behaviour for a shader.

The initial V boundary behaviour for a shader is kQ3ShaderUVBoundaryWrap.

Parameter Descriptions
shader
The shader to update.
vBoundary
The V boundary behaviour for the shader.
function result
Success or failure of the operation.

Q3Shader_Submit


( TQ3Status ) Q3Shader_Submit (
    TQ3ShaderObject shader,
    TQ3ViewObject view
);
Discussion

Submit a shader to a view.

Parameter Descriptions
shader
The shader to submit.
view
The view to submit the shader to.
function result
Success or failure of the operation.

Q3SurfaceShader_GetType


( TQ3ObjectType ) Q3SurfaceShader_GetType (
    TQ3SurfaceShaderObject shader
);
Discussion

Get the type of a surface shader.

Parameter Descriptions
shader
The shader to query.
function result
The type of the surface shader.

Q3TextureShader_GetTexture


( TQ3Status ) Q3TextureShader_GetTexture (
    TQ3ShaderObject shader,
    TQ3TextureObject *texture
);
Discussion

Get the texture from a texture shader.

The reference count of the returned shader is incremented, and the caller must release their reference when done.

Parameter Descriptions
shader
The shader to query.
texture
Receives the texture from the texture shader.
function result
Success or failure of the operation.

Q3TextureShader_New


( TQ3ShaderObject ) Q3TextureShader_New (
    TQ3TextureObject texture
);
Discussion

Create a texture shader.

Parameter Descriptions
texture
The texture object for the shader.
function result
The new texture shader.

Q3TextureShader_SetTexture


( TQ3Status ) Q3TextureShader_SetTexture (
    TQ3ShaderObject shader,
    TQ3TextureObject texture
);
Discussion

Set the texture for a texture shader.

Parameter Descriptions
shader
The shader to update.
texture
The texture for the shader.
function result
Success or failure of the operation.

Q3Texture_GetHeight


( TQ3Status ) Q3Texture_GetHeight (
    TQ3TextureObject texture,
    TQ3Uns32 *height
);
Discussion

Get the height of a texture object.

Parameter Descriptions
texture
The texture to query.
height
Receives the height of the texture object.
function result
Success or failure of the operation.

Q3Texture_GetType


( TQ3ObjectType ) Q3Texture_GetType (
    TQ3TextureObject texture
);
Discussion

Get the type of a texture object.

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

Q3Texture_GetWidth


( TQ3Status ) Q3Texture_GetWidth (
    TQ3TextureObject texture,
    TQ3Uns32 *width
);
Discussion

Get the width of a texture object.

Parameter Descriptions
texture
The texture to query.
width
Receives the width of the texture object.
function result
Success or failure of the operation.

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