|
Visual Computing Library
devel
|
The Tangent class represents a N-Dimensional tangent vector that will be part of an Element (e.g. Vertex, Face...). More...
#include <vclib/mesh/components/tangent.h>

Public Types | |
| using | TangentType = P |
| Expose the type of the Tangent. | |
Public Member Functions | |
| P | bitangent () const |
| Computes and returns the bitangent vector using the tangent and normal vectors. | |
| Tangent () | |
| Initilizes the Tangent to (0, 0, 0) right handed. | |
| P & | tangent () |
| Returns a reference of the tangent of the element. | |
| const P & | tangent () const |
| Returns a const reference of the tangent of the element. | |
| bool & | tangentRightHanded () |
| Returns a reference to the boolean that indicates if the tangent is right handed. | |
| bool | tangentRightHanded () const |
| Returns true if the tangent is right handed, false otherwise. | |
Protected Member Functions | |
| void | deserialize (std::istream &is) |
| template<typename Element > | |
| void | importFrom (const Element &e, bool=true) |
| void | serialize (std::ostream &os) const |
Private Types | |
| using | Base = Component< Tangent< P, ParentElemType, OPT >, CompId::TANGENT, std::pair< P, bool >, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT > |
Private Member Functions | |
| void | init () |
| Initializes the tangent to (0, 0, 0) right handed. | |
The Tangent class represents a N-Dimensional tangent vector that will be part of an Element (e.g. Vertex, Face...).
Allows to get and set objects that represent a tangent. The type of these object must satisfy the PointConcept.
For example, if you have a Vertex Element v with the Tangent component, you'll be able to access to this component member functions from v:
| P | The type of the tangent. This template argument must be a type that satisfies the PointConcept. |
| ParentElemType | This template argument must be void if the component needs to be stored horizontally, or the type of the parent element that will contain this component if the component needs to be stored vertically. |
| OPT | If true, the component will be optional. This argument is considered only if the component is stored vertically. |
|
inline |
Computes and returns the bitangent vector using the tangent and normal vectors.
The bitangent is computed as the cross product between the tangent and the normal vectors. The direction of the bitangent depends on the handedness of the tangent.
| vcl::MissingComponentException | if the Normal component is not enabled on the parent element. |
|
inlineprivate |
Initializes the tangent to (0, 0, 0) right handed.
It is made in the init function since the component could be not available during construction (e.g. if the component is optional and not enabled).
This member function is hidden by the element that inherits this class.
|
inline |
Returns a reference of the tangent of the element.
|
inline |
Returns a const reference of the tangent of the element.
|
inline |
Returns a reference to the boolean that indicates if the tangent is right handed.
|
inline |
Returns true if the tangent is right handed, false otherwise.