Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ (3GC) — Aviator 1.8

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fbcall(3G)

fbend(3G)

fbget(3G)

fbput(3G)

fbstart(3G)

###############################################################################
#                                                                             #
#  Copyright © 1989-1991 by Artificial Horizons®, Inc.  All rights reserved.  #
#                                                                             #
#      This material  constitutes  the trade  secrets  and confidential,      #
#      proprietary information of Bruce Factor and Curtis Priem,  and is      #
#      under license  to Artificial Horizons, Inc.   The material is not      #
#      to be disclosed,  reproduced,  copied,  or used in any manner not      #
#      permitted under license from Artificial Horizons, Inc.   For more      #
#      information email "ahi-interest@ahi.com".                              #
#                                                                             #
###############################################################################

MATRIX(3GC)           AVIATOR GRAPHICS INTERFACE CLASSES            MATRIX(3GC)



NAME
        FB_CLASS__MATRIX_MV3X2, FB_CLASS__MATRIX_MV3X2_DC3X2,
        FB_CLASS__MATRIX_MV4X3, FB_CLASS__MATRIX_MV4X3_DC4X3,
        FB_CLASS__MATRIX_MV4X3_CLIP_DC4X3,
        FB_CLASS__MATRIX_MV4X4_CLIP_DIVIDE_DC4X3 - matrix classes

SYNOPSIS
        #include <agi.h>
        register Fbuffer fbp;

        fbstart(fbp, FB_CLASS__MATRIX_MV3X2)  {
        }  fbend(fbp);

        fbstart(fbp, FB_CLASS__MATRIX_MV3X2_DC3X2)  {
        }  fbend(fbp);

        fbstart(fbp, FB_CLASS__MATRIX_MV4X3)  {
        }  fbend(fbp);

        fbstart(fbp, FB_CLASS__MATRIX_MV4X3_DC4X3)  {
        }  fbend(fbp);

        fbstart(fbp, FB_CLASS__MATRIX_MV4X3_CLIP_DC4X3)  {
        }  fbend(fbp);

        fbstart(fbp, FB_CLASS__MATRIX_MV4X4_CLIP_DIVIDE_DC4X3)  {
        }  fbend(fbp);

DESCRIPTION
        The MV matrix classes are used for defining concatenated modeling/
        viewing matrices which is used for transforming from 3D modeling
        coordinate space or world coordinate space to normalized projection
        coordinate space (-1<=X<=1, -1<=Y<=1, 0<=Z<=1).  The DC matrix
        classes are used for transforming coordinates from normalized
        projection coordinate space to device coordinate space (pixel
        coordinates on the screen).

        The class FB_CLASS__MATRIX_MV3X2 is used for defining a 2D modeling/
        viewing matrix.  Legal members for this class are:
                MV_0_0, MV_0_1,
                MV_1_0, MV_1_1,
                MV_3_0, MV_3_1,

        The class FB_CLASS__MATRIX_MV3X2_DC3X2 is used for defining a 2D
        modeling/viewing matrix and a 2D device coordinate matrix.  Legal
        members for this class are:
                MV_0_0, MV_0_1,                     DC_0_0,
                MV_1_0, MV_1_1,                             DC_1_1,
                MV_3_0, MV_3_1,                     DC_3_0, DC_3_1,

        The class FB_CLASS__MATRIX_MV4X3 is used for defining a 3D modeling/
        viewing matrix.  Legal members for this class are:
                MV_0_0, MV_0_1, MV_0_2,
                MV_1_0, MV_1_1, MV_1_2,
                MV_2_0, MV_2_1, MV_2_2,
                MV_3_0, MV_3_1, MV_3_2,

        The class FB_CLASS__MATRIX_MV4X3_DC4X3 is used for defining a 3D
        modeling/viewing matrix and a 3D device coordinate matrix.  Legal
        members for this class are:
                MV_0_0, MV_0_1, MV_0_2,             DC_0_0,
                MV_1_0, MV_1_1, MV_1_2,                     DC_1_1,
                MV_2_0, MV_2_1, MV_2_2,                             DC_2_2,
                MV_3_0, MV_3_1, MV_3_2,             DC_3_0, DC_3_1, DC_3_2,

        The class FB_CLASS__MATRIX_MV4X3_CLIP_DC4X3 is used for defining a 3D
        modeling/viewing matrix and a 3D device coordinate matrix with 3D
        clipping (-1<=MV_X<=1, -1<=MV_Y<=1, 0<=MV_Z<=1).  Legal members for
        this class are:
                MV_0_0, MV_0_1, MV_0_2, MV_0_3,     DC_0_0,
                MV_1_0, MV_1_1, MV_1_2, MV_1_3,             DC_1_1,
                MV_2_0, MV_2_1, MV_2_2, MV_2_3,                     DC_2_2,
                MV_3_0, MV_3_1, MV_3_2, MV_3_3,     DC_3_0, DC_3_1, DC_3_2,

        The class FB_CLASS__MATRIX_MV4X3_CLIP_DC4X4 is used for defining a 4D
        modeling/viewing matrix and a 3D device coordinate matrix with 4D
        clipping (-MV_W<=MV_X<=MV_W, -MV_W<=MV_Y<=MV_W, 0<=MV_Z<=MV_W) and
        perspective divide.  Legal members for this class are:
                MV_0_0, MV_0_1, MV_0_2, MV_0_3,     DC_0_0,
                MV_1_0, MV_1_1, MV_1_2, MV_1_3,             DC_1_1,
                MV_2_0, MV_2_1, MV_2_2, MV_2_3,                     DC_2_2,
                MV_3_0, MV_3_1, MV_3_2, MV_3_3,     DC_3_0, DC_3_1, DC_3_2,

        agi only stores into the frame buffer the members that are defined.
        It is the user's responsibility to make sure that all members for a
        class of matrix have been loaded.  Members of the matrix are static
        in the frame buffer.  Reload all members when switching from one
        matrix class to another.

MEMBERS
        The following public members can be accessed by using routines
        fbput(3G) and fbget(3G).  These 32 bit numbers can be signed integer,
        signed 16.16 fixed point, or IEEE single precision floating point
        format.

        FB_MEMBER__MV_0_0__INTEGER
        FB_MEMBER__MV_0_0__FIXED
        FB_MEMBER__MV_0_0__FLOAT
                MV_0_0 is the MV matrix element at row 0 column 0.
        FB_MEMBER__MV_0_1__INTEGER
        FB_MEMBER__MV_0_1__FIXED
        FB_MEMBER__MV_0_1__FLOAT
                MV_0_1 is the MV matrix element at row 0 column 1.
        FB_MEMBER__MV_0_2__INTEGER
        FB_MEMBER__MV_0_2__FIXED
        FB_MEMBER__MV_0_2__FLOAT
                MV_0_2 is the MV matrix element at row 0 column 2.
        FB_MEMBER__MV_0_3__INTEGER
        FB_MEMBER__MV_0_3__FIXED
        FB_MEMBER__MV_0_3__FLOAT
                MV_0_3 is the MV matrix element at row 0 column 3.
        FB_MEMBER__MV_1_0__INTEGER
        FB_MEMBER__MV_1_0__FIXED
        FB_MEMBER__MV_1_0__FLOAT
                MV_1_0 is the MV matrix element at row 1 column 0.
        FB_MEMBER__MV_1_1__INTEGER
        FB_MEMBER__MV_1_1__FIXED
        FB_MEMBER__MV_1_1__FLOAT
                MV_1_1 is the MV matrix element at row 1 column 1.
        FB_MEMBER__MV_1_2__INTEGER
        FB_MEMBER__MV_1_2__FIXED
        FB_MEMBER__MV_1_2__FLOAT
                MV_1_2 is the MV matrix element at row 1 column 2.
        FB_MEMBER__MV_1_3__INTEGER
        FB_MEMBER__MV_1_3__FIXED
        FB_MEMBER__MV_1_3__FLOAT
                MV_1_3 is the MV matrix element at row 1 column 3.
        FB_MEMBER__MV_2_0__INTEGER
        FB_MEMBER__MV_2_0__FIXED
        FB_MEMBER__MV_2_0__FLOAT
                MV_2_0 is the MV matrix element at row 2 column 0.
        FB_MEMBER__MV_2_1__INTEGER
        FB_MEMBER__MV_2_1__FIXED
        FB_MEMBER__MV_2_1__FLOAT
                MV_2_1 is the MV matrix element at row 2 column 1.
        FB_MEMBER__MV_2_2__INTEGER
        FB_MEMBER__MV_2_2__FIXED
        FB_MEMBER__MV_2_2__FLOAT
                MV_2_2 is the MV matrix element at row 2 column 2.
        FB_MEMBER__MV_2_3__INTEGER
        FB_MEMBER__MV_2_3__FIXED
        FB_MEMBER__MV_2_3__FLOAT
                MV_2_3 is the MV matrix element at row 2 column 3.
        FB_MEMBER__MV_3_0__INTEGER
        FB_MEMBER__MV_3_0__FIXED
        FB_MEMBER__MV_3_0__FLOAT
                MV_3_0 is the MV matrix element at row 3 column 0.
        FB_MEMBER__MV_3_1__INTEGER
        FB_MEMBER__MV_3_1__FIXED
        FB_MEMBER__MV_3_1__FLOAT
                MV_3_1 is the MV matrix element at row 3 column 1.
        FB_MEMBER__MV_3_2__INTEGER
        FB_MEMBER__MV_3_2__FIXED
        FB_MEMBER__MV_3_2__FLOAT
                MV_3_2 is the MV matrix element at row 3 column 2.
        FB_MEMBER__MV_3_3__INTEGER
        FB_MEMBER__MV_3_3__FIXED
        FB_MEMBER__MV_3_3__FLOAT
                MV_3_3 is the MV matrix element at row 3 column 3.
        FB_MEMBER__DC_0_0__INTEGER
        FB_MEMBER__DC_0_0__FIXED
        FB_MEMBER__DC_0_0__FLOAT
                DC_0_0 is the DC matrix element at row 0 column 0.
        FB_MEMBER__DC_1_1__INTEGER
        FB_MEMBER__DC_1_1__FIXED
        FB_MEMBER__DC_1_1__FLOAT
                DC_1_1 is the DC matrix element at row 1 column 1.
        FB_MEMBER__DC_2_2__INTEGER
        FB_MEMBER__DC_2_2__FIXED
        FB_MEMBER__DC_2_2__FLOAT
                DC_2_2 is the DC matrix element at row 2 column 2.
        FB_MEMBER__DC_3_0__INTEGER
        FB_MEMBER__DC_3_0__FIXED
        FB_MEMBER__DC_3_0__FLOAT
                DC_3_0 is the DC matrix element at row 3 column 0.
        FB_MEMBER__DC_3_1__INTEGER
        FB_MEMBER__DC_3_1__FIXED
        FB_MEMBER__DC_3_1__FLOAT
                DC_3_1 is the DC matrix element at row 3 column 1.
        FB_MEMBER__DC_3_2__INTEGER
        FB_MEMBER__DC_3_2__FIXED
        FB_MEMBER__DC_3_2__FLOAT
                DC_3_2 is the DC matrix element at row 3 column 2.

FUNCTIONS
        The following public functions can be called by using the fbcall(3G)
        routine:

        FB_FUNCTION__STORE
                The STORE function stores the current MV and DC matrices into
                the frame buffer.

SEE ALSO
        fbcall(3G), fbend(3G), fbget(3G), fbput(3G), fbstart(3G)

WARNING
        agi does not check to see if all of the correct members have been
        defined for a given class of matrix.  If the is no control of the
        order that matrices are stored, restore all elements each time.

PERFORMANCE
        FLOAT is the fastest format.

        FB_CLASS__MATRIX_MV3X2 is faster than FB_CLASS__MATRIX_MV3X2_DC3X2.
        FB_CLASS__MATRIX_MV4X3 is faster than FB_CLASS__MATRIX_MV4X3_DC4X3.
        Concatenate the MV and DC matrix into one MV matrix, thus saving
        doing both the MV and DC transformation for every point.

        If the is control of the loading of the matrix and the matrix class
        type does not change, only store the matrix members that have changed
        from one matrix to another (ie. a scaling or translation member).



AGI Release 1.8         Last change: 25 December 1991

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026