Biomedical Image Analysis Library
The Biomedical Image Analysis Library is a poweful tool for developers, physicians, researchers, engineers, and so on.
|
Classes related to computer graphics and rendering process. More...
Classes | |
class | Bial::Vector3D |
The Vector3D class is a Geometric representation of a vector direction in 3D space. More... | |
class | Bial::Point3D |
The Point3D class is a Geometric representation of a point in 3D space. A point is a zerodimensional location in 3D space. More... | |
class | Bial::Normal |
The Normal class is the geometric representation of a Normal in 3D space. A surface normal (or just normal) is a vector that is perpendicular to a surface at a particular position. It can be defined as the cross product of any two nonparallel vectors that are tangent to the surface at a point. The implementations of Normal3D and Vector3D are very similar. Like vectors, normals are represented by three floats x, y, and z; they can be added and subtracted to compute new normals; and they can be scaled and normalized. However, a normal cannot be added to a point, and one cannot take the cross product of two normals. More... | |
class | Bial::Ray |
The Ray class is a mathematic representation of a light ray. A ray is a semiinfinite line specified by its origin and direction. More... | |
class | Bial::BBox |
The BBox class is a Bounding Box with 8 vertices, and can be represented by 2 points (6coordinates). More... | |
class | Bial::Transform3D |
The Transform3D class holds affine matrices and is used to apply geometric transformations over cartesian coordinates. The affine transformation multiplies the coordinates vector to the affine matrix. More... | |
class | Bial::DifferentialGeometry |
The DifferentialGeometry class is a parametric representation of the Shape geometry. More... | |
class | Bial::FastTransform |
Functions | |
double | Bial::Lerp (double t, double v1, double v2) |
Simple linear interpolation. More... | |
Vector3D | Bial::operator* (double s, const Vector3D &vec) |
Point3D | Bial::operator* (double s, const Point3D &p) |
Normal | Bial::operator* (double s, const Normal &norm) |
double | Bial::Dot (const Vector3D &v1, const Vector3D &v2) |
double | Bial::Dot (const Normal &n1, const Normal &n2) |
double | Bial::Dot (const Normal &n1, const Vector3D &v2) |
double | Bial::Dot (const Vector3D &v1, const Normal &n2) |
double | Bial::AbsDot (const Vector3D &v1, const Vector3D &v2) |
double | Bial::AbsDot (const Normal &n1, const Normal &n2) |
double | Bial::AbsDot (const Normal &n1, const Vector3D &v2) |
double | Bial::AbsDot (const Vector3D &v1, const Normal &n2) |
Vector3D | Bial::Cross (const Vector3D &v1, const Vector3D &v2) |
void | Bial::CoordinateSystem (const Vector3D &v1, Vector3D *v2, Vector3D *v3) |
double | Bial::Distance (const Point3D &p1, const Point3D &p2) |
double | Bial::DistanceSquared (const Point3D &p1, const Point3D &p2) |
Normal | Bial::FaceForward (const Normal &n, const Vector3D &v) |
template<class O > | |
O & | Bial::operator<< (O &os, const Vector3D &vec) |
template<class O > | |
O & | Bial::operator<< (O &os, const Point3D &pt) |
template<class O > | |
O & | Bial::operator<< (O &os, const Normal &norm) |
template<class O > | |
O & | Bial::operator<< (O &os, const Ray &ray) |
template<class O > | |
O & | Bial::operator<< (O &os, const BBox &box) |
template<class O > | |
O & | Bial::operator<< (O &os, const Transform3D &tr) |
Classes related to computer graphics and rendering process.
class Bial::Vector3D |
The Vector3D class is a Geometric representation of a vector direction in 3D space.
Definition at line 44 of file Geometrics.hpp.
Public Member Functions | |
Vector3D () | |
Vector3D (double xx, double yy, double zz) | |
Vector3D constructor. More... | |
Vector3D (const Normal &norm) | |
Conversion from Normal to Vector3D. More... | |
bool | HasNaNs () const |
HasNaNs returns if the any of the components is'nt a valid number. return none. More... | |
bool | operator== (const Vector3D &vec) const |
Returns if the components match. More... | |
bool | operator!= (const Vector3D &vec) const |
Returns if the components do not match. More... | |
Vector3D | operator+ (const Vector3D &vec) const |
Add operation, the vector components are added. More... | |
Vector3D & | operator+= (const Vector3D &vec) |
Add operation, the vector components are added. More... | |
Vector3D | operator- (const Vector3D &vec) const |
Subtract operation, the vector components are subtracted. More... | |
Vector3D & | operator-= (const Vector3D &vec) |
Subtract operation, the vector components are subtracted. More... | |
Vector3D | operator* (double s) const |
Multiply operation, the vector components are multiplied to a scalar value. More... | |
Vector3D & | operator*= (double s) |
Multiply operation, the vector components are multiplied to a scalar value. More... | |
Vector3D | operator/ (double s) const |
Division operation, the vector components are divided by s. More... | |
Vector3D & | operator/= (double s) |
Division operation, the vector components are divided by s. More... | |
Vector3D | operator- () const |
Returns the vector inverse. More... | |
double | operator[] (int i) const |
Gives the option to loop over the components of a vector. More... | |
double & | operator[] (int i) |
Gives the option to loop over the components of a vector. More... | |
double | LengthSquared () const |
Returns the length of a vector. Given a vector , this function returns . More... | |
double | Length () const |
Returns the squared length of a vector. Given a vector , this function returns . More... | |
Vector3D | Normalized () const |
Returns the normalized vector. Given a vector , this function returns . return none. More... | |
Point3D | toPoint () const |
Conversion from Vector3D to Point3D. More... | |
Static Public Member Functions | |
template<class D > | |
static Vector3D | fromVector (const Vector< D > vec) |
Conversion from Bial::Vector to Vector3D. More... | |
Public Attributes | |
double | x |
double | y |
Vector direction in y. More... | |
double | z |
Vector direction in z. More... | |
Bial::Vector3D::Vector3D | ( | ) |
|
explicit |
Vector3D constructor.
xx | Vector direction in x. |
yy | Vector direction in y. |
zz | Vector direction in z. |
Conversion from Bial::Vector to Vector3D.
Input | vector. |
Definition at line 976 of file Geometrics.hpp.
bool Bial::Vector3D::HasNaNs | ( | ) | const |
HasNaNs returns if the any of the components is'nt a valid number. return none.
double Bial::Vector3D::Length | ( | ) | const |
Returns the squared length of a vector.
Given a vector , this function returns .
double Bial::Vector3D::LengthSquared | ( | ) | const |
Returns the length of a vector.
Given a vector , this function returns .
Vector3D Bial::Vector3D::Normalized | ( | ) | const |
Returns the normalized vector.
Given a vector , this function returns . return none.
Returns if the components do not match.
vec | Input vector to be compared. return none. |
Vector3D Bial::Vector3D::operator* | ( | double | s | ) | const |
Multiply operation, the vector components are multiplied to a scalar value.
s | A scalar value to be multiplied. |
Vector3D& Bial::Vector3D::operator*= | ( | double | s | ) |
Multiply operation, the vector components are multiplied to a scalar value.
s | A scalar value to be multiplied. |
Add operation, the vector components are added.
vec | Input vector to be compared. |
Add operation, the vector components are added.
vec | Input vector |
Subtract operation, the vector components are subtracted.
vec | Input vector |
Vector3D Bial::Vector3D::operator- | ( | ) | const |
Returns the vector inverse.
Subtract operation, the vector components are subtracted.
vec | Input vector |
Vector3D Bial::Vector3D::operator/ | ( | double | s | ) | const |
Division operation, the vector components are divided by s.
s | A scalar denominator. |
Vector3D& Bial::Vector3D::operator/= | ( | double | s | ) |
Division operation, the vector components are divided by s.
s | A scalar denominator. |
Returns if the components match.
vec | Input vector return none. |
double Bial::Vector3D::operator[] | ( | int | i | ) | const |
Gives the option to loop over the components of a vector.
i | is the component index ( 0 for x, 1 for y, and 2 for z ) |
double& Bial::Vector3D::operator[] | ( | int | i | ) |
Gives the option to loop over the components of a vector.
i | is the component index ( 0 for x, 1 for y, and 2 for z ) |
Point3D Bial::Vector3D::toPoint | ( | ) | const |
double Bial::Vector3D::x |
Definition at line 49 of file Geometrics.hpp.
double Bial::Vector3D::y |
Vector direction in y.
Definition at line 51 of file Geometrics.hpp.
double Bial::Vector3D::z |
Vector direction in z.
Definition at line 53 of file Geometrics.hpp.
class Bial::Point3D |
The Point3D class is a Geometric representation of a point in 3D space.
A point is a zerodimensional location in 3D space.
Definition at line 218 of file Geometrics.hpp.
Public Member Functions | |
Point3D () | |
Point3D (double xx, double yy, double zz) | |
Point3D constructor. More... | |
bool | HasNaNs () const |
HasNaNs returns if the any of the components is'nt a valid number. return none. More... | |
bool | operator== (const Point3D &p) const |
Returns if the positions match. More... | |
bool | operator!= (const Point3D &p) const |
Returns if the positions do not match. More... | |
Point3D | operator+ (const Vector3D &vec) const |
Add operation, the point position is added to the vector components. More... | |
Point3D & | operator+= (const Vector3D &vec) |
Add operation, the point position is added to the vector components. More... | |
Vector3D | operator- (const Point3D &p) const |
Subtract operation, the point positions are subtracted, generating a Vector3D. More... | |
Vector3D | operator- (const Vector3D &vec) const |
Subtract operation, the point position is subtracted to the vector components, generating a Vector3D. More... | |
Point3D & | operator-= (const Vector3D &vec) |
Subtract operation, the point position is subtracted to the vector components. More... | |
Point3D & | operator+= (const Point3D &p) |
Add operation, the points positions are added. More... | |
Point3D | operator+ (const Point3D &p) const |
Add operation, the points positions are added. More... | |
Point3D | operator* (double f) const |
Multiply operation, the point position components are multiplied to a scalar value. More... | |
Point3D & | operator*= (double f) |
Multiply operation, the point position components are multiplied to a scalar value. More... | |
Point3D | operator/ (double f) const |
Division operation, the point position components are divided by s. More... | |
Point3D & | operator/= (double f) |
Division operation, the point position components are divided by s. More... | |
double | operator[] (int i) const |
Gives the option to loop over the components of the point position. More... | |
double & | operator[] (int i) |
Gives the option to loop over the components of the point position. More... | |
Vector3D | toVector () const |
Conversion from Point3D to Vector3D. More... | |
bool | operator< (const Point3D &p) const |
Simple function used in sorting algoritms. More... | |
bool | operator> (const Point3D &p) const |
Simple function used in sorting algoritms. More... | |
Public Attributes | |
double | x |
double | y |
Point position in y. More... | |
double | z |
Point position in z. More... | |
Bial::Point3D::Point3D | ( | ) |
|
explicit |
Point3D constructor.
xx | Point direction in x. |
yy | Point direction in y. |
zz | Point direction in z. |
bool Bial::Point3D::HasNaNs | ( | ) | const |
HasNaNs returns if the any of the components is'nt a valid number. return none.
Returns if the positions do not match.
p | Input point to be compared. return none. |
Point3D Bial::Point3D::operator* | ( | double | f | ) | const |
Multiply operation, the point position components are multiplied to a scalar value.
f | A scalar value to be multiplied. |
Point3D& Bial::Point3D::operator*= | ( | double | f | ) |
Multiply operation, the point position components are multiplied to a scalar value.
f | A scalar value to be multiplied. |
Add operation, the point position is added to the vector components.
vec | Input vector. |
Add operation, the points positions are added.
p | Input point. |
Add operation, the point position is added to the vector components.
vec | Input vector. |
Add operation, the points positions are added.
p | Input point. |
Subtract operation, the point positions are subtracted, generating a Vector3D.
p | Input point. |
Subtract operation, the point position is subtracted to the vector components, generating a Vector3D.
vec | Input vector. |
Subtract operation, the point position is subtracted to the vector components.
vec | Input vector. |
Point3D Bial::Point3D::operator/ | ( | double | f | ) | const |
Division operation, the point position components are divided by s.
s | A scalar denominator. |
Point3D& Bial::Point3D::operator/= | ( | double | f | ) |
Division operation, the point position components are divided by s.
s | A scalar denominator. |
Simple function used in sorting algoritms.
p | Input point to be compared. return none. |
Definition at line 374 of file Geometrics.hpp.
Returns if the positions match.
p | Input point to be compared. |
Simple function used in sorting algoritms.
p | Input point to be compared. return none. |
Definition at line 385 of file Geometrics.hpp.
double Bial::Point3D::operator[] | ( | int | i | ) | const |
Gives the option to loop over the components of the point position.
i | is the component index ( 0 for x, 1 for y, and 2 for z ) |
double& Bial::Point3D::operator[] | ( | int | i | ) |
Gives the option to loop over the components of the point position.
i | is the component index ( 0 for x, 1 for y, and 2 for z ) |
Vector3D Bial::Point3D::toVector | ( | ) | const |
double Bial::Point3D::x |
Definition at line 223 of file Geometrics.hpp.
double Bial::Point3D::y |
Point position in y.
Definition at line 225 of file Geometrics.hpp.
double Bial::Point3D::z |
Point position in z.
Definition at line 227 of file Geometrics.hpp.
class Bial::Normal |
The Normal class is the geometric representation of a Normal in 3D space.
A surface normal (or just normal) is a vector that is perpendicular to a surface at a particular position.
It can be defined as the cross product of any two nonparallel vectors that are tangent to the surface at a point.
The implementations of Normal3D and Vector3D are very similar. Like vectors, normals are represented by three floats x, y, and z;
they can be added and subtracted to compute new normals; and they can be scaled and normalized.
However, a normal cannot be added to a point, and one cannot take the cross product of two normals.
Definition at line 403 of file Geometrics.hpp.
Public Member Functions | |
Normal () | |
Normal (double xx, double yy, double zz) | |
Normal constructor. More... | |
Normal (const Vector3D &vec) | |
Conversion from Vector3D to Normal. More... | |
bool | HasNaNs () const |
HasNaNs returns if the any of the components is'nt a valid number. return none. More... | |
bool | operator== (const Normal &norm) const |
Returns if the components match. More... | |
bool | operator!= (const Normal &norm) const |
Returns if the components do not match. More... | |
Normal | operator+ (const Normal &norm) const |
Add operation, the normal components are added. More... | |
Normal & | operator+= (const Normal &norm) |
Add operation, the normal components are added. More... | |
Normal | operator- (const Normal &norm) const |
Subtract operation, the normal components are subtracted. More... | |
Normal & | operator-= (const Normal &norm) |
Subtract operation, the normal components are subtracted. More... | |
Normal | operator* (double s) const |
Multiply operation, the normal components are multiplied to a scalar value. More... | |
Normal & | operator*= (double s) |
Multiply operation, the normal components are multiplied to a scalar value. More... | |
Normal | operator/ (double s) const |
Division operation, the normal components are divided by s. More... | |
Normal & | operator/= (double s) |
Division operation, the normal components are divided by s. More... | |
Normal | operator- () const |
Returns the normal inverse. More... | |
double | operator[] (int i) const |
Gives the option to loop over the components of a normal. More... | |
double & | operator[] (int i) |
Gives the option to loop over the components of a normal. More... | |
double | LengthSquared () const |
Returns the length of a normal. Given a normal , this function returns . More... | |
double | Length () const |
Returns the squared length of a normal. Given a normal , this function returns . More... | |
Normal | Normalized () const |
Returns the normalized normal. Given a normal , this function returns . return none. More... | |
Public Attributes | |
double | x |
double | y |
Normal direction in y. More... | |
double | z |
Normal direction in z. More... | |
Bial::Normal::Normal | ( | ) |
|
explicit |
Normal constructor.
xx | Normal direction in x. |
yy | Normal direction in y. |
zz | Normal direction in z. |
bool Bial::Normal::HasNaNs | ( | ) | const |
HasNaNs returns if the any of the components is'nt a valid number. return none.
double Bial::Normal::Length | ( | ) | const |
Returns the squared length of a normal.
Given a normal , this function returns .
double Bial::Normal::LengthSquared | ( | ) | const |
Returns the length of a normal.
Given a normal , this function returns .
Normal Bial::Normal::Normalized | ( | ) | const |
Returns the normalized normal.
Given a normal , this function returns . return none.
Returns if the components do not match.
norm | Input normal to be compared. return none. |
Normal Bial::Normal::operator* | ( | double | s | ) | const |
Multiply operation, the normal components are multiplied to a scalar value.
s | A scalar value to be multiplied. |
Normal& Bial::Normal::operator*= | ( | double | s | ) |
Multiply operation, the normal components are multiplied to a scalar value.
s | A scalar value to be multiplied. |
Add operation, the normal components are added.
norm | Input normal to be compared. |
Add operation, the normal components are added.
norm | Input normal |
Subtract operation, the normal components are subtracted.
norm | Input normal |
Normal Bial::Normal::operator- | ( | ) | const |
Returns the normal inverse.
Subtract operation, the normal components are subtracted.
norm | Input normal |
Normal Bial::Normal::operator/ | ( | double | s | ) | const |
Division operation, the normal components are divided by s.
s | A scalar denominator. |
Normal& Bial::Normal::operator/= | ( | double | s | ) |
Division operation, the normal components are divided by s.
s | A scalar denominator. |
Returns if the components match.
norm | Input normal return none. |
double Bial::Normal::operator[] | ( | int | i | ) | const |
Gives the option to loop over the components of a normal.
i | is the component index ( 0 for x, 1 for y, and 2 for z ) |
double& Bial::Normal::operator[] | ( | int | i | ) |
Gives the option to loop over the components of a normal.
i | is the component index ( 0 for x, 1 for y, and 2 for z ) |
double Bial::Normal::x |
Definition at line 408 of file Geometrics.hpp.
double Bial::Normal::y |
Normal direction in y.
Definition at line 410 of file Geometrics.hpp.
double Bial::Normal::z |
Normal direction in z.
Definition at line 412 of file Geometrics.hpp.
class Bial::Ray |
The Ray class is a mathematic representation of a light ray.
A ray is a semiinfinite line specified by its origin and direction.
Definition at line 563 of file Geometrics.hpp.
Public Member Functions | |
Ray () | |
Ray (const Point3D &origin, const Vector3D &direction, double start=0.f, double end=INFINITY, double t=0.f, int d=0) | |
Ray constructor. More... | |
Ray (const Point3D &origin, const Vector3D &direction, const Ray &parent, double start=0.f, double end=INFINITY) | |
Ray constructor with "parent" ray. For convenience we also provide another ray constructor that takes a “parent” ray; the idea is that when additional rays are being spawned from an intersection, it’s useful to be able to copy the time value and set the depth value for the new ray based on the corresponding values from the previous ray. More... | |
Point3D | operator() (double t) const |
Operator that makes the ray be used as a parametric function and returns a Point3D at position t along the ray. Given a Ray with origin and direction , this function returns . More... | |
Public Attributes | |
Point3D | o |
Vector3D | d |
Ray direction vector. More... | |
double | mint |
Minimum value for parameter t. More... | |
double | maxt |
Maximum value for parameter t. More... | |
double | time |
Ray time counter used in animated objects simulation. More... | |
int | depth |
The ray depth member tracks how many times light has bounced along the current path. More... | |
Bial::Ray::Ray | ( | ) |
Bial::Ray::Ray | ( | const Point3D & | origin, |
const Vector3D & | direction, | ||
const Ray & | parent, | ||
double | start = 0.f , |
||
double | end = INFINITY |
||
) |
Ray constructor with "parent" ray.
For convenience we also provide another ray constructor that takes a “parent” ray; the idea is that when additional rays are being spawned from an intersection, it’s useful to be able to copy the time value and set the depth value for the new ray based on the corresponding values from the previous ray.
Point3D Bial::Ray::operator() | ( | double | t | ) | const |
Vector3D Bial::Ray::d |
Ray direction vector.
Definition at line 573 of file Geometrics.hpp.
int Bial::Ray::depth |
The ray depth member tracks how many times light has bounced along the current path.
Definition at line 589 of file Geometrics.hpp.
|
mutable |
Maximum value for parameter t.
Definition at line 581 of file Geometrics.hpp.
|
mutable |
Minimum value for parameter t.
Definition at line 577 of file Geometrics.hpp.
Point3D Bial::Ray::o |
Definition at line 569 of file Geometrics.hpp.
double Bial::Ray::time |
Ray time counter used in animated objects simulation.
Definition at line 585 of file Geometrics.hpp.
class Bial::BBox |
The BBox class is a Bounding Box with 8 vertices, and can be represented by 2 points (6coordinates).
Definition at line 640 of file Geometrics.hpp.
Public Member Functions | |
BBox () | |
BBox (const Point3D &p) | |
BBox (const Point3D &p1, const Point3D &p2) | |
bool | operator== (const BBox &other) const |
bool | operator!= (const BBox &other) const |
BBox | Normalized () const |
bool | Overlaps (const BBox &b) const |
bool | Inside (const Point3D &pt) const |
void | Expand (double delta) |
double | SurfaceArea () const |
double | Volume () const |
int | MaximumExtent () const |
const Point3D & | operator[] (int i) const |
Point3D & | operator[] (int i) |
Point3D | at (size_t vtx) |
Point3D | Lerp (double tx, double ty, double tz) const |
Vector3D | Offset (const Point3D &p) const |
void | BoundingSphere (Point3D *c, double *rad) const |
Public Attributes | |
Point3D | pMin |
Point3D | pMax |
Friends | |
BBox | Union (const BBox &b, const Point3D &p) |
BBox | Union (const BBox &b, const BBox &b2) |
Bial::BBox::BBox | ( | ) |
Point3D Bial::BBox::at | ( | size_t | vtx | ) |
void Bial::BBox::BoundingSphere | ( | Point3D * | c, |
double * | rad | ||
) | const |
void Bial::BBox::Expand | ( | double | delta | ) |
Point3D Bial::BBox::Lerp | ( | double | tx, |
double | ty, | ||
double | tz | ||
) | const |
int Bial::BBox::MaximumExtent | ( | ) | const |
|
inline |
Definition at line 656 of file Geometrics.hpp.
Point3D& Bial::BBox::operator[] | ( | int | i | ) |
double Bial::BBox::SurfaceArea | ( | ) | const |
double Bial::BBox::Volume | ( | ) | const |
Point3D Bial::BBox::pMax |
Definition at line 643 of file Geometrics.hpp.
Point3D Bial::BBox::pMin |
Definition at line 643 of file Geometrics.hpp.
class Bial::Transform3D |
The Transform3D class holds affine matrices and is used to apply geometric transformations over cartesian coordinates.
The affine transformation multiplies the coordinates vector to the affine matrix.
Definition at line 696 of file Geometrics.hpp.
anonymous enum : int |
Enumerator | |
---|---|
X | |
Y | |
Z |
Definition at line 699 of file Geometrics.hpp.
Bial::Transform3D::Transform3D | ( | ) |
Transform3D Bial::Transform3D::copy | ( | ) |
Matrix< double > Bial::Transform3D::getAffineMatrix | ( | ) | const |
Matrix< double > Bial::Transform3D::getInverseMatrix | ( | ) | const |
bool Bial::Transform3D::HasScale | ( | ) | const |
Transform3D Bial::Transform3D::Inverse | ( | ) |
Transform3D& Bial::Transform3D::LookAt | ( | const Point3D & | pos, |
const Point3D & | look, | ||
const Vector3D & | up | ||
) |
bool Bial::Transform3D::operator!= | ( | const Transform3D & | other | ) |
Point3D Bial::Transform3D::operator() | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
Transform3D Bial::Transform3D::operator* | ( | const Transform3D & | other | ) | const |
bool Bial::Transform3D::operator== | ( | const Transform3D & | other | ) |
void Bial::Transform3D::reset | ( | ) |
Transform3D& Bial::Transform3D::Rotate | ( | double | degrees, |
int | dms | ||
) |
Transform3D& Bial::Transform3D::Rotate | ( | double | degrees, |
const Vector3D & | axis | ||
) |
Transform3D& Bial::Transform3D::RotateRadians | ( | double | rad, |
int | dms | ||
) |
Transform3D& Bial::Transform3D::RotateRadians | ( | double | rad, |
const Vector3D & | axis | ||
) |
Transform3D& Bial::Transform3D::Scale | ( | double | sx, |
double | sy, | ||
double | sz = 1.f |
||
) |
Transform3D& Bial::Transform3D::Scale | ( | double | factor | ) |
Transform3D& Bial::Transform3D::Shear | ( | double | s_xy, |
double | s_yx, | ||
double | s_xz, | ||
double | s_yz, | ||
double | s_zx, | ||
double | s_zy | ||
) |
bool Bial::Transform3D::SwapsHandedness | ( | ) | const |
Transform3D& Bial::Transform3D::Translate | ( | double | dx, |
double | dy, | ||
double | dz = 0.f |
||
) |
class Bial::DifferentialGeometry |
The DifferentialGeometry class is a parametric representation of the Shape geometry.
Definition at line 778 of file Geometrics.hpp.
Public Member Functions | |
DifferentialGeometry () | |
DifferentialGeometry empty constructor. More... | |
DifferentialGeometry (const Point3D &p, const Vector3D &dpdu, const Vector3D &dpdv, const Normal &dndu, const Normal &dndv, float u, float v, const Shape *sh) | |
DifferentialGeometry constructor. More... | |
Public Attributes | |
Point3D | p |
p is the point of interest. More... | |
Normal | nn |
nn is the normalized version of the surface normal. It's obtained from the cross product between dpdu and dpdv. More... | |
Vector3D | dpdu |
dpdu is the partial derivative of the surface position in u. More... | |
Vector3D | dpdv |
dpdv is the partial derivative of the surface position in v. More... | |
Normal | dndu |
dndu is the partial derivative of the surface normal in u. The vectors dndu amd dndv record the differential change in surface normal along the surface. More... | |
Normal | dndv |
dndv is the partial derivative of the surface normal in u. The vectors dndu amd dndv record the differential change in surface normal along the surface. More... | |
float | u |
u is a parametric coordinate. More... | |
float | v |
v is a parametric coordinate. More... | |
const Shape * | shape |
shape is a reference to the Shape that the differential geometry lies on. More... | |
Bial::DifferentialGeometry::DifferentialGeometry | ( | ) |
DifferentialGeometry empty constructor.
Bial::DifferentialGeometry::DifferentialGeometry | ( | const Point3D & | p, |
const Vector3D & | dpdu, | ||
const Vector3D & | dpdv, | ||
const Normal & | dndu, | ||
const Normal & | dndv, | ||
float | u, | ||
float | v, | ||
const Shape * | sh | ||
) |
DifferentialGeometry constructor.
p | is the point of interest. |
dpdu | is the partial derivative of the surface position in u. |
dpdv | is the partial derivative of the surface position in v. |
dndu | is the partial derivative of the surface normal in u. |
dndv | is the partial derivative of the surface normal in v. |
u | is a parametric coordinate. |
v | is a parametric coordinate. |
sh | is a reference to the Shape that the differential geometry lies on. |
Normal Bial::DifferentialGeometry::dndu |
dndu is the partial derivative of the surface normal in u. The vectors dndu amd dndv record the differential change in surface normal along the surface.
Definition at line 801 of file Geometrics.hpp.
Normal Bial::DifferentialGeometry::dndv |
dndv is the partial derivative of the surface normal in u. The vectors dndu amd dndv record the differential change in surface normal along the surface.
Definition at line 806 of file Geometrics.hpp.
Vector3D Bial::DifferentialGeometry::dpdu |
dpdu is the partial derivative of the surface position in u.
Definition at line 792 of file Geometrics.hpp.
Vector3D Bial::DifferentialGeometry::dpdv |
dpdv is the partial derivative of the surface position in v.
Definition at line 796 of file Geometrics.hpp.
Normal Bial::DifferentialGeometry::nn |
nn is the normalized version of the surface normal. It's obtained from the cross product between dpdu and dpdv.
Definition at line 788 of file Geometrics.hpp.
Point3D Bial::DifferentialGeometry::p |
p is the point of interest.
Definition at line 783 of file Geometrics.hpp.
shape is a reference to the Shape that the differential geometry lies on.
Definition at line 818 of file Geometrics.hpp.
float Bial::DifferentialGeometry::u |
u is a parametric coordinate.
Definition at line 810 of file Geometrics.hpp.
float Bial::DifferentialGeometry::v |
v is a parametric coordinate.
Definition at line 814 of file Geometrics.hpp.
class Bial::FastTransform |
Definition at line 844 of file Geometrics.hpp.
Public Types | |
enum | : int { X = 0, Y, Z } |
Public Member Functions | |
FastTransform () | |
FastTransform (const Matrix< int > &mat) | |
FastTransform (const Matrix< int > &mat, const Matrix< int > &inv) | |
Matrix< int > | getAffineMatrix () const |
void | setAffineMatrix (const Matrix< int > &mat) |
Matrix< int > | getInverseMatrix () const |
void | setInverseMatrix (const Matrix< int > &value) |
void | reset () |
FastTransform | Inverse () |
FastTransform | copy () |
bool | operator== (const FastTransform &other) |
bool | operator!= (const FastTransform &other) |
FastTransform | operator* (const FastTransform &other) const |
Point3D | operator() (double x, double y, double z) const |
void | operator() (int x, int y, int z, int *xx, int *yy, int *zz) const |
Point3D | operator() (const Point3D &pt) const |
void | operator() (const Point3D &pt, Point3D *res) const |
FastTransform & | Translate (int dx, int dy, int dz=0.f) |
FastTransform & | Scale (int sx, int sy, int sz=1.f) |
FastTransform & | Scale (int factor) |
FastTransform & | Rotate (double degrees, int dms) |
FastTransform & | RotateRadians (double rad, int dms) |
FastTransform & | Shear (int s_xy, int s_yx, int s_xz, int s_yz, int s_zx, int s_zy) |
anonymous enum : int |
Enumerator | |
---|---|
X | |
Y | |
Z |
Definition at line 847 of file Geometrics.hpp.
Bial::FastTransform::FastTransform | ( | ) |
FastTransform Bial::FastTransform::copy | ( | ) |
Matrix< int > Bial::FastTransform::getAffineMatrix | ( | ) | const |
Matrix< int > Bial::FastTransform::getInverseMatrix | ( | ) | const |
FastTransform Bial::FastTransform::Inverse | ( | ) |
bool Bial::FastTransform::operator!= | ( | const FastTransform & | other | ) |
Point3D Bial::FastTransform::operator() | ( | double | x, |
double | y, | ||
double | z | ||
) | const |
void Bial::FastTransform::operator() | ( | int | x, |
int | y, | ||
int | z, | ||
int * | xx, | ||
int * | yy, | ||
int * | zz | ||
) | const |
FastTransform Bial::FastTransform::operator* | ( | const FastTransform & | other | ) | const |
bool Bial::FastTransform::operator== | ( | const FastTransform & | other | ) |
void Bial::FastTransform::reset | ( | ) |
FastTransform& Bial::FastTransform::Rotate | ( | double | degrees, |
int | dms | ||
) |
FastTransform& Bial::FastTransform::RotateRadians | ( | double | rad, |
int | dms | ||
) |
FastTransform& Bial::FastTransform::Scale | ( | int | sx, |
int | sy, | ||
int | sz = 1.f |
||
) |
FastTransform& Bial::FastTransform::Scale | ( | int | factor | ) |
FastTransform& Bial::FastTransform::Shear | ( | int | s_xy, |
int | s_yx, | ||
int | s_xz, | ||
int | s_yz, | ||
int | s_zx, | ||
int | s_zy | ||
) |
FastTransform& Bial::FastTransform::Translate | ( | int | dx, |
int | dy, | ||
int | dz = 0.f |
||
) |
double Bial::Lerp | ( | double | t, |
double | v1, | ||
double | v2 | ||
) |
Simple linear interpolation.
t | Factor |
v1 | value 1 |
v2 | value 2 return none. |
Definition at line 938 of file Geometrics.hpp.
Definition at line 943 of file Geometrics.hpp.
Definition at line 948 of file Geometrics.hpp.
Definition at line 953 of file Geometrics.hpp.
Definition at line 958 of file Geometrics.hpp.
O& Bial::operator<< | ( | O & | os, |
const Transform3D & | tr | ||
) |
Definition at line 963 of file Geometrics.hpp.