Template Struct Normal
Defined in File Normal.hpp
Inheritance Relationships
Base Type
public lvr2::BaseVector< CoordType >(Template Struct BaseVector)
Struct Documentation
-
template<typename CoordType>
struct Normal : public lvr2::BaseVector<CoordType> A vector guaranteed to be normalized (length = 1).
If you have an object of type
Normal, you can be sure that it always has the length 1. The easiest way to create aNormalis to use the methodVector::normalized().Public Functions
-
inline Normal()
-
explicit Normal(BaseVector<CoordType> base)
Creates a normal vector from the underlying vector representation.
- Parameters:
base – This vector must not be the null-vector, else the behavior is undefined.
-
Normal(CoordType x, CoordType y, CoordType z)
Initializes the normal with the given coordinates.
Note that the given coordinates must not form the null-vector, else the behavior is undefined.
Public Static Functions
-
template<typename CollectionT>
static Normal<CoordType> &average(const CollectionT &normals) Returns the average of all normals in the given collection.
The collection need to work with a range-based for-loop and its elements need to be normals. It has to contain at least one element.
-
inline Normal()