#include <TexturedSmoothTriangle.h>
Inherits Triangle.
Inheritance diagram for TexturedSmoothTriangle:
Public Member Functions | |
TexturedSmoothTriangle (const Triangle &v) | |
TexturedSmoothTriangle (const Triangle &v, const Vec3f &na, const Vec3f &nb, const Vec3f &nc) | |
TexturedSmoothTriangle (const Triangle &v, const Vec3f &na, const Vec3f &nb, const Vec3f &nc, const TexCoordinate &ta, const TexCoordinate &tb, const TexCoordinate &tc) | |
void | setNormals (const Vec3f &na, const Vec3f &nb, const Vec3f &nc) |
Vec3f | normal (const Ray &ray) const |
void | setTexCoord (const TexCoordinate &ta, const TexCoordinate &tb, const TexCoordinate &tc) |
TexCoordinate | texCoord (const Ray &ray) const |
Private Attributes | |
Vec3f | mNa |
Vertex normals. | |
Vec3f | mNb |
Vec3f | mNc |
TexCoordinate | mTa |
Texture coordinates. | |
TexCoordinate | mTb |
TexCoordinate | mTc |
Definition at line 15 of file TexturedSmoothTriangle.h.
TexturedSmoothTriangle::TexturedSmoothTriangle | ( | const Triangle & | v | ) | [inline] |
Definition at line 18 of file TexturedSmoothTriangle.h.
TexturedSmoothTriangle::TexturedSmoothTriangle | ( | const Triangle & | v, | |
const Vec3f & | na, | |||
const Vec3f & | nb, | |||
const Vec3f & | nc | |||
) | [inline] |
Definition at line 23 of file TexturedSmoothTriangle.h.
References mNa, mNb, mNc, and Vec3f::normalize().
TexturedSmoothTriangle::TexturedSmoothTriangle | ( | const Triangle & | v, | |
const Vec3f & | na, | |||
const Vec3f & | nb, | |||
const Vec3f & | nc, | |||
const TexCoordinate & | ta, | |||
const TexCoordinate & | tb, | |||
const TexCoordinate & | tc | |||
) | [inline] |
Definition at line 37 of file TexturedSmoothTriangle.h.
References mNa, mNb, mNc, and Vec3f::normalize().
void TexturedSmoothTriangle::setNormals | ( | const Vec3f & | na, | |
const Vec3f & | nb, | |||
const Vec3f & | nc | |||
) | [inline] |
sets the normals to the given values
Definition at line 59 of file TexturedSmoothTriangle.h.
References mNa, mNb, mNc, and Vec3f::normalize().
Calculate a normal in global coordinates given barycentric coordinates of the hitpoint
Reimplemented from Triangle.
Definition at line 74 of file TexturedSmoothTriangle.h.
References Ray::hit(), mNa, mNb, mNc, Ray::obj(), PhysicalObject::toGlobalCoordinates(), Ray::u(), and Ray::v().
void TexturedSmoothTriangle::setTexCoord | ( | const TexCoordinate & | ta, | |
const TexCoordinate & | tb, | |||
const TexCoordinate & | tc | |||
) | [inline] |
TexCoordinate TexturedSmoothTriangle::texCoord | ( | const Ray & | ray | ) | const [inline, virtual] |
Reimplemented from Primitive.
Definition at line 100 of file TexturedSmoothTriangle.h.
References Ray::hit(), mTa, mTb, mTc, Ray::u(), Ray::v(), TexCoordinate::x(), and TexCoordinate::y().
Vec3f TexturedSmoothTriangle::mNa [private] |
Vertex normals.
Definition at line 115 of file TexturedSmoothTriangle.h.
Referenced by normal(), setNormals(), and TexturedSmoothTriangle().
Vec3f TexturedSmoothTriangle::mNb [private] |
Definition at line 116 of file TexturedSmoothTriangle.h.
Referenced by normal(), setNormals(), and TexturedSmoothTriangle().
Vec3f TexturedSmoothTriangle::mNc [private] |
Definition at line 117 of file TexturedSmoothTriangle.h.
Referenced by normal(), setNormals(), and TexturedSmoothTriangle().
TexCoordinate TexturedSmoothTriangle::mTa [private] |
Texture coordinates.
Definition at line 120 of file TexturedSmoothTriangle.h.
Referenced by setTexCoord(), and texCoord().
TexCoordinate TexturedSmoothTriangle::mTb [private] |
Definition at line 121 of file TexturedSmoothTriangle.h.
Referenced by setTexCoord(), and texCoord().
TexCoordinate TexturedSmoothTriangle::mTc [private] |
Definition at line 122 of file TexturedSmoothTriangle.h.
Referenced by setTexCoord(), and texCoord().