Contained Within
Find More Documentation
Featured Support Resources
| Descargar este libro en PDF
Transform Test Descriptions
26
- This chapter describes the Transform test programs. The following is defined for each test program:
-
- Name of the test program
- Test types (See the section "Denizen Test Types" on page 2 for the different test types.)
- Description of the test program
- Attributes tested by the program
- Operators tested by the program
- Output from the test program
· trans_operators_2d
-
| Test Types: | SM |
| Description: | Creates, copies, reads, writes, multiplies, inverts, transposes, and makes identity 2D INT, BIN and FLT transform objects. Copies 2D INT to 2D BIN transform objects and vice versa. |
- Attributes Tested: XGL_TRANS_2D and Table 26-1, Column A at the end of this chapter
- Operators Tested: xgl_object_create
-
-
xgl_transform_write
xgl_transform_read
-
-
xgl_transform_copy
xgl_transform_multiply
xgl_transform_invert
xgl_transform_transpose
xgl_transform_identity
xgl_object_destroy
Output: All testing is done without the creation of a window
- raster, so nothing can be viewed on the monitor screen.
· trans_operators_3d
-
| Test Types: | SM |
| Description: | Creates, copies, reads, writes, multiplies, inverts, transposes, and makes identity 3D FLT and INT transforms (3D BIN transforms are not supported). Copies 2D FLT and INT transforms to 3D FLT and INT transforms respectively and vice versa. |
- Attributes Tested: XGL_TRANS_2D
-
-
XGL_TRANS_3D
and Table 26-1, Column A at the end of this chapter
Operators Tested: xgl_object_create
xgl_transform_write
xgl_transform_read
xgl_transform_copy
xgl_transform_multiply
xgl_transform_transpose
xgl_transform_identity
xgl_object_destroy
Output: All testing is done without the creation of a window
- raster, so nothing can be viewed on the monitor screen.
· trans_pt_ptlist_2d
-
| Test Types: | SM |
| Description: | Transforms F2D points. Transforms F2D, F2H, FLAG_F2D, and COLOR_F2D point lists using 2D FLT transform objects. |
- Attributes Tested: XGL_TRANS_2D and Table 26-1, Column A at the end of this chapter
- Operators Tested: xgl_object_create
-
| Output:· trans_pt_ptlist_3d | All testing is done without the creation of a window raster, so nothing can be viewed on the monitor screen. |
| Test Types: | SM |
| Description: | Transforms F3D points. Transforms F3D, F3H, FLAG_F3D, and COLOR_F3D point lists using 3D FLT transform objects. |
- Attributes Tested: XGL_TRANS_3D and Table 26-1, Column A at the end of this chapter
- Operators Tested: xgl_object_create
-
-
xgl_transform_write
xgl_transform_point
xgl_transform_point_list
Output: All testing is done without the creation of a window
- raster, so nothing can be viewed on the monitor screen.
· trans_multiply_float
-
| Test Types: | SM |
| Description: | Multiplies all possible types of 2D (3D) transform objects (identity, translate, scale, scale-translate, rotate, 3x2(4x4), and general). These types are internal to XGL and the multiplication is different for each case for efficiency. Uses only FLT transforms. |
- Attributes Tested: XGL_AXIS_X
- Operators Tested: xgl_object_create
-
-
xgl_transform_translate
xgl_transform_scale
xgl_transform_rotate
xgl_transform_write
xgl_transform_multiply
xgl_transform_read
Output: All testing is done without the creation of a window
- raster, so nothing can be viewed on the monitor screen.
· Modeling Transformations
· trans_model_trans
-
| Test Types: | SM |
| Description: | Changes XGL_CTX_GLOBAL_MODEL_TRANS and LOCAL_MODEL_TRANS of a 2D context using 2D FLT, INT, and BIN transform objects. Checks that the XGL_CTX_MODEL_TRANS is correctly updated. Repeats for 3D context and transform objects. |
- Attributes Tested: XGL_CTX_LOCAL_MODEL_TRANS
-
-
XGL_CTX_MODEL_TRANS
XGL_DATA_INT
XGL_MEM_RAS
XGL_TRANS_2D
XGL_TRANS_3D
XGL_TRANS_DBL
and Table 26-1, Column B at the end of this chapter
Operators Tested: xgl_object_create
xgl_object_set
xgl_object_get
xgl_transform_rotate
xgl_transform_translate
xgl_transform_scale
xgl_transform_multiply
xgl_transform_read
xgl_transform_copy
xgl_transform_write
-
| Output:· trans_global_model_trans_2d | All testing is done without the creation of a window raster, so nothing can be viewed on the monitor screen. |
| Test Types: | INDEX, SM |
| Description: | Tests global 2D FLT modeling transforms (scaling, rotation, translation independent of each other) on F2D solid-filled polygons without edges (global 2D FLT scaling, rotation, translation without interactions). Tries three different settings for each of the transformations, scaling, rotation, and translation. Does three rotations, one for each axis before another increment of 20 degrees is applied to the angle. Nine different angles are used in increments of 20 degrees from -20 degrees to a maximum of 170 degrees. |
- Attributes Tested: XGL_TRANS_2D and Table 26-1, Column B at the end of this chapter
- Operators Tested: xgl_object_create
-
-
xgl_polygon
xgl_transform_translate
xgl_object_set
xgl_transform_scale
xgl_transform_rotate
Output: Draws for the default global model transformation six
- vertex polygons with the normal appearance of an arrowhead without the shaft, and the tip of the arrow pointing in the direction of the top of the window raster. For the small insignificant translation, the figure changes its position almost unnoticeably. For the substantial translation, the figure moves lower and to the right of its previous position. For the translation representing a shift distance of more than half the window raster width, the figure is clipped, so only a small parallelogram from the left portion of the arrow is visible.
- For the small insignificant scaling, the figure is practically restored to its original position. For the equal significant scaling, the figure is substantially enlarged and appears in the middle right side of the window raster. For the double scaling for width with marginal increase for height, the
- figure is enlarged and clipped approximately to the same extent as the translation example.
- Rotation changes the position of the arrow polygon so that; (1) the arrow points to left of center, (2) the arrow returns to normal position but moves down the window, and (3) the arrow points to the right side of the window and moves toward the left side of the window raster. The arrow continues to face the same direction but moves more to the left with each subsequent rotation, with the arrow being clipped at the seventh and eighth loop and entirely clipped away at the ninth closing loop.
· trans_global_model_trans_2d_1
-
| Test Types: | INDEX, SM |
| Description: | Tests global 2D FLT modeling transforms (interaction of scaling, rotation, and translation) using all update modes on F2D solid-filled polygons without edges (interaction of global 2D FLT scaling, rotation, translation, update modes). For two different translation transformations, tries three different rotation transformations in combination with three update modes, and for each of these rotation transformations, tries three scale transformations in combination with three update modes applied to the default global model transformation. |
- Attributes Tested: XGL_TRANS_2D XGL_TRANS_POSTCONCAT XGL_TRANS_PRECONCAT and Table 26-1, Column B at the end of this chapter
- Operators Tested: xgl_object_create
-
| Output:· trans_global_model_trans_3d | For the default global model transformation, the arrow-shaped polygon appears on the window raster. For all other changes to the global model transformation, the window raster remains the background black color. |
| Test Types: | INDEX, SM |
| Description: | Tests global 3D FLT modeling transforms (scaling, rotation, and translation independent of each other) on F3D solid filled polygons without edges (global 3D FLT scaling, rotation, and translation without interactions). Tries three different settings for each of the transformations, scaling, and translation. Does nine rotations, uses an axis, and then another increment of 20 degrees to the angle. Uses nine different angles in increments of 20 degrees from -20 degrees to a maximum of 170 degrees. |
- Attributes Tested: XGL_TRANS_3D and Table 26-1, Column B at the end of this chapter
- Operators Tested: xgl_polygon
-
-
xgl_object_create
xgl_transform_translate
xgl_object_set
xgl_transform_scale
xgl_transform_rotate
Output: Draws for the default global model transformation six
- vertex polygons with the normal appearance of an arrowhead without the shaft, and the tip of the arrow pointing in the direction of the top of the window raster. For the small insignificant translation, the figure changes its position almost unnoticeably. For the substantial translation, the figure moves lower and to the right of its previous position. For the translation representing a shift distance of more than half the window raster width, the figure is clipped, so only a small parallelogram from the left portion of the arrow is visible.
- For the small insignificant scaling, the figure is practically restored to its original position. For the equal significant scaling, the figure is substantially enlarged and appears in
- the middle right side of the window raster. For the double scaling for width with marginal increase for height, the figure is enlarged and clipped approximately to the same extent as the translation example. The first set of nine loops sees the position of the arrow change from its default location to movement vertically toward the top of the raster until clipping of the arrow structure takes place. The second set of nine loops sees the arrow structure move first right horizontally, and then left until clipping on the left side of the window raster takes place. The final loop sees the position change from pointing to the upper left side of the raster to swerving down and curving along a horizontal line parallel to the bottom of the window raster while pointing to the right side of the raster. Again the final positions reflect clipping of the arrow structure.
· trans_global_model_trans_3d_1
-
| Test Types: | INDEX, SM |
| Description: | Tests global 3D FLT modeling transforms (interaction of scaling, rotation, and translation) using all update modes on F3D solid filled polygons without edges (interaction of 3D FLT global scaling, rotation, translation, and update modes). For two different translation transformations, tries two update modes in combination with two different rotations and two different scaling transformations. |
- Attributes Tested: XGL_TRANS_3D
-
-
XGL_TRANS_POSTCONCAT
XGL_TRANS_PRECONCAT
and Table 26-1, Column B at the end of this chapter
Operators Tested: xgl_object_create
xgl_polygon
xgl_transform_translate
xgl_transform_copy
xgl_transform_rotate
xgl_transform_scale
xgl_object_set
xgl_transform_multiply
-
| Output:· trans_update_model_trans | First displays a polygon normally that is, six vertex arrow shaped objects with the point in the direction of the top of the window rasters. After the combined translation, rotation, and scaling transformations to the global modeling transform, the background color is all that is viewed. |
| Test Types: | RGB, SM |
| Description: | Tests xgl_context_update_model_trans(). First tests the various settings of XGL_CTX_MODEL_TRANS_STACK_SIZE. Then tries push and pop requests for local model trans and global model trans separately, together and finally several pushes and pops on the same stack. Tries XGL_MTR_NEW_LEVEL. Tries 2D and 3D transforms. The attribute values tried are XGL_CTX_MODEL_TRANS_STACK_SIZE: default, 0, and nonzero. |
- Attributes Tested: XGL_CTX_GLOBAL_MODEL_TRANS
-
-
XGL_CTX_LOCAL_MODEL_TRANS
XGL_CTX_MODEL_TRANS
XGL_CTX_MODEL_TRANS_STACK_SIZE
XGL_MTR_GLOBAL_TRANS
XGL_MTR_LOCAL_TRANS
XGL_MTR_NEW_LEVEL
XGL_MTR_POP
XGL_MTR_PUSH
XGL_TRANS
XGL_TRANS_2D
XGL_TRANS_3D
XGL_TRANS_DIMENSION
Operators Tested: xgl_object_get
xgl_object_create
xgl_transform_write
xgl_object_set
xgl_transform_copy
xgl_context_update_model_trans
Output: All testing is done without the creation of a window
- raster, so nothing can be viewed on the monitor screen.
· View Transformation
· trans_view_trans_3d
-
| Test Types: | INDEX, SM |
| Description: | Tests nonidentity 3D FLT view transformation with default for other stages of the pipeline on F3D solid filled polygons without edges (simple 3D view transformation) |
- Attributes Tested: XGL_CTX_VIEW_TRANS
- Operators Tested: xgl_object_get
-
-
xgl_transform_write
xgl_polygon
Output: A small arrow-shaped polygon appears in the upper left
side of the window raster.
-
Table 26-1
| Column A | Column B |
| XGL_DATA_FLT | XGL_AXIS_Y |
| XGL_TRANS | XGL_AXIS_Z |
| XGL_TRANS_DATA_TYPE | XGL_CTX_GLOBAL_MODEL_
TRANS |
| XGL_TRANS_DIMENSION | XGL_TRANS
XGL_TRANS_DATA_TYPE
XGL_DATA_FLT
XGL_TRANS_DIMENSION
XGL_TRANS_REPLACE |
|
|