Set the texture quad display mode
<node3d>.setTexQuadDisplayMode( | |
mode | |
) |
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). |
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.