Vizard 8 » Command Index » Vizard objects » node3d » <node3d>.setTexQuadDisplayMode
8.1

<node3d>.setTexQuadDisplayMode

Set the texture quad display mode

<node3d>.setTexQuadDisplayMode(  
mode  
)  
mode
One of the following texture quad display modes:

Display Mode

Description

viz.TEXQUAD_STRETCH

Stretches the texture to fill the entire quad.

viz.TEXQUAD_FIT

Stretches the texture to fill the entire quad, but still maintains the original aspect ratio of the texture. If the quad and texture aspect ratios do not match, then either the the width or height of the quad will be reduced to maintain the texture aspect ratio.

viz.TEXQUAD_FILL

Stretches the texture to fill the entire quad, but still maintains the original aspect ratio of the texture. If the quad and texture aspect ratios do not match, then the texture will be cropped.

viz.TEXQUAD_FIXED

The texture is displayed at its original size within the quad. If the texture size exceeds the quad size, then the texture will be scaled down to fit within the quad.

viz.TEXQUAD_TILE

The texture is tiled within the quad using the original texture size.

viz.TEXQUAD_CORNER_FIT

The corners of the texture are scaled to fit the quad. The remaining area in the center of the quad is stretched to display the area between the corners. The position of the corners are controlled by the texture border rectangle (<texture>.setBorderRect).

viz.TEXQUAD_CORNER_FIXED

The corners of the texture are displayed at original size. The remaining area in the center of the quad is stretched to display the area between the corners. If the corner sizes exceed the quad size, then the corners will be scaled down to fit within the quad. The position of the corners are controlled by the texture border rectangle (<texture>.setBorderRect).

Remarks

This command controls how textures are displayed on texture quads. The default mode is viz.TEXQUAD_STRETCH.

Certain display modes rely on the texture border rectangle to determine how to split up the image. The texture border rectangle is specified by the <texture>.setBorderRect command.

The texture display mode takes the raw texture quad size into account when computing how to display the texture. It does not take any scaling transformations on the node into account. The <node3d:texquad>.setSize command can be used to set the raw size of texture quads.

Return Value

None

See also

<node3d>.getTexQuadDisplayMode
<node3d:texquad>.setSize
<texture>.setBorderRect