Represents and helps construct a quadrilateral with one texture and a Phong material.
More...
#include <m2mpartialmesh.h>
|
| Quad (QVector3D normal, ImageInfo texture, PhongInfo material, QVector3D v1, QVector2D t1, QVector3D v2, QVector2D t2, QVector3D v3, QVector2D t3, QVector3D v4, QVector2D t4) |
| Creates a quad with the given vertices. Vertices must be specified in counterclockwise order. More...
|
|
QVector3D | vertex (int idx) const |
|
QVector2D | texCoord (int idx) const |
|
QVector3D | normal () const |
|
ImageInfo | imageInfo () const |
|
PhongInfo | phongInfo () const |
|
Represents and helps construct a quadrilateral with one texture and a Phong material.
◆ Quad()
Quad::Quad |
( |
QVector3D |
normal, |
|
|
ImageInfo |
texture, |
|
|
PhongInfo |
material, |
|
|
QVector3D |
v1, |
|
|
QVector2D |
t1, |
|
|
QVector3D |
v2, |
|
|
QVector2D |
t2, |
|
|
QVector3D |
v3, |
|
|
QVector2D |
t3, |
|
|
QVector3D |
v4, |
|
|
QVector2D |
t4 |
|
) |
| |
Creates a quad with the given vertices. Vertices must be specified in counterclockwise order.
◆ imageInfo()
◆ makeVerticalQuad()
Quad Quad::makeVerticalQuad |
( |
QVector3D |
center, |
|
|
QVector2D |
xzDirection, |
|
|
float |
width, |
|
|
float |
height, |
|
|
ImageInfo |
texture, |
|
|
PhongInfo |
material, |
|
|
bool |
upsideDown = false |
|
) |
| |
|
static |
makeVerticalQuad Creates a vertical quad.
- Parameters
-
center | The center point of the quad in 3D space. |
xzDirection | The normal direction of the quad – this vector is assumed to be normalized. A vertical quad's normal always has a Y component of 0. |
width | The "width" of the quad (the other dimension of the quad, as opposed to height). |
height | The "height" of the quad (size along Y axis). |
texture | The texture of the quad. |
material | The material of the quad. |
upsideDown | If this is "false," the quad's vertices will be output in the order 4 3 1 2 when looking at the quad. Otherwise, the vertices are output in the order 2 1 4 3 |
- Returns
- The specified quad.
◆ normal()
QVector3D Quad::normal |
( |
| ) |
const |
◆ phongInfo()
◆ texCoord()
QVector2D Quad::texCoord |
( |
int |
idx | ) |
const |
◆ vertex()
QVector3D Quad::vertex |
( |
int |
idx | ) |
const |
The documentation for this class was generated from the following files: