Visual Computing Library
devel
|
The Normal class represents a N-Dimensional normal vector that will be part of an Element (e.g. Vertex, Face...). More...
#include <vclib/mesh/components/normal.h>
Public Types | |
using | NormalType = P |
Expose the type of the Normal. | |
Public Member Functions | |
P & | normal () |
Returns a reference of the normal of the element. | |
const P & | normal () const |
Returns a const reference of the normal of the element. | |
Normal ()=default | |
Initilizes the Normal to (0, 0, 0). | |
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< Normal< P, ParentElemType, OPT >, CompId::NORMAL, P, ParentElemType, !std::is_same_v< ParentElemType, void >, OPT > |
The Normal class represents a N-Dimensional normal vector that will be part of an Element (e.g. Vertex, Face...).
Allows to get and set an object that represents a normal. The type of this object must satisfy the PointConcept.
For example, if you have a Vertex Element v
with the Normal component, you'll be able to access to this component member functions from v
:
P | The type of the normal. 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 |
Returns a reference of the normal of the element.
|
inline |
Returns a const reference of the normal of the element.