Blender  V3.3
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Attributes | List of all members
Freestyle::VecMat::Vec< T, N > Class Template Reference

#include <VecMat.h>

Inheritance diagram for Freestyle::VecMat::Vec< T, N >:
Freestyle::VecMat::Vec2< real > Freestyle::VecMat::Vec2< double > Freestyle::VecMat::Vec2< float > Freestyle::VecMat::Vec3< real > Freestyle::VecMat::Vec3< float > Freestyle::VecMat::Vec3< unsigned >

Public Types

typedef T value_type
 

Public Member Functions

 Vec ()
 
 ~Vec ()
 
template<class U >
 Vec (const U tab[N])
 
template<class U >
 Vec (const std::vector< U > &tab)
 
template<class U >
 Vec (const Vec< U, N > &v)
 
value_type operator[] (const unsigned i) const
 
value_typeoperator[] (const unsigned i)
 
value_type norm () const
 
value_type squareNorm () const
 
Vec< T, N > & normalize ()
 
Vec< T, N > & normalizeSafe ()
 
Vec< T, Noperator+ (const Vec< T, N > &v) const
 
Vec< T, Noperator- (const Vec< T, N > &v) const
 
Vec< T, Noperator* (const typename Vec< T, N >::value_type r) const
 
Vec< T, Noperator/ (const typename Vec< T, N >::value_type r) const
 
value_type operator* (const Vec< T, N > &v) const
 
template<class U >
Vec< T, N > & operator= (const Vec< U, N > &v)
 
template<class U >
Vec< T, N > & operator+= (const Vec< U, N > &v)
 
template<class U >
Vec< T, N > & operator-= (const Vec< U, N > &v)
 
template<class U >
Vec< T, N > & operator*= (const U r)
 
template<class U >
Vec< T, N > & operator/= (const U r)
 
bool operator== (const Vec< T, N > &v) const
 
bool operator!= (const Vec< T, N > &v) const
 
bool operator< (const Vec< T, N > &v) const
 
bool operator> (const Vec< T, N > &v) const
 

Static Public Member Functions

static unsigned dim ()
 

Protected Types

enum  { _dim = N }
 

Protected Attributes

value_type _coord [N]
 

Detailed Description

template<class T, unsigned N>
class Freestyle::VecMat::Vec< T, N >

Definition at line 40 of file VecMat.h.

Member Typedef Documentation

◆ value_type

template<class T , unsigned N>
typedef T Freestyle::VecMat::Vec< T, N >::value_type

Definition at line 42 of file VecMat.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T , unsigned N>
anonymous enum
protected
Enumerator
_dim 

Definition at line 264 of file VecMat.h.

Constructor & Destructor Documentation

◆ Vec() [1/4]

template<class T , unsigned N>
Freestyle::VecMat::Vec< T, N >::Vec ( )
inline

Definition at line 45 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, and N.

◆ ~Vec()

template<class T , unsigned N>
Freestyle::VecMat::Vec< T, N >::~Vec ( )
inline

Definition at line 52 of file VecMat.h.

References N.

◆ Vec() [2/4]

template<class T , unsigned N>
template<class U >
Freestyle::VecMat::Vec< T, N >::Vec ( const U  tab[N])
inlineexplicit

Definition at line 57 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, and T.

◆ Vec() [3/4]

template<class T , unsigned N>
template<class U >
Freestyle::VecMat::Vec< T, N >::Vec ( const std::vector< U > &  tab)
inlineexplicit

Definition at line 64 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, and T.

◆ Vec() [4/4]

template<class T , unsigned N>
template<class U >
Freestyle::VecMat::Vec< T, N >::Vec ( const Vec< U, N > &  v)
inlineexplicit

Definition at line 71 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, T, and v.

Member Function Documentation

◆ dim()

template<class T , unsigned N>
static unsigned Freestyle::VecMat::Vec< T, N >::dim ( )
inlinestatic

Definition at line 89 of file VecMat.h.

References N.

◆ norm()

template<class T , unsigned N>
value_type Freestyle::VecMat::Vec< T, N >::norm ( ) const
inline

Definition at line 95 of file VecMat.h.

References sqrt(), Freestyle::VecMat::Vec< T, N >::squareNorm(), and T.

Referenced by Freestyle::SteerableViewMap::AddFEdge(), Freestyle::Grid::castInfiniteRay(), Freestyle::Grid::castRayToFindFirstIntersection(), Freestyle::Strip::cleanUpSingularities(), Freestyle::Smoother::computeCurvature(), Freestyle::ViewMapBuilder::ComputeRayCastingVisibility(), Freestyle::Strip::computeTexCoordWithTips(), Freestyle::computeVisibility(), Freestyle::Strip::createStrip(), Freestyle::createStroke(), Freestyle::CurveInternal::__point_iterator< Traits >::decrement(), Freestyle::CurveInternal::CurvePointIterator::decrement(), Freestyle::firstIntersectionGridVisitor::examineOccluder(), Freestyle::ViewEdge::getLength2D(), Freestyle::SteerableViewMap::getSVMNumber(), Freestyle::gts_vertex_principal_directions(), Freestyle::CurveInternal::__point_iterator< Traits >::increment(), Freestyle::CurveInternal::CurvePointIterator::increment(), Freestyle::Grid::initRay(), Freestyle::BlenderFileLoader::insertShapeNode(), Freestyle::VecMat::Vec< T, N >::normalize(), Freestyle::VecMat::Vec< T, N >::normalizeSafe(), Freestyle::Functions0D::GetViewMapGradientNormF0D::operator()(), Freestyle::Functions0D::VertexOrientation2DF0D::operator()(), Freestyle::Functions0D::VertexOrientation3DF0D::operator()(), Freestyle::Functions0D::Curvature2DAngleF0D::operator()(), Freestyle::FEdgeXDetector::preProcessFace(), Freestyle::FEdgeXDetector::ProcessSilhouetteFace(), Freestyle::Curve::push_vertex_back(), Freestyle::Curve::push_vertex_front(), Freestyle::Stroke::Resample(), Freestyle::WOEdge::setVecAndAngle(), Freestyle::Smoother::Smoother(), and Freestyle::FEdge::z_discontinuity().

◆ normalize()

template<class T , unsigned N>
Vec<T, N>& Freestyle::VecMat::Vec< T, N >::normalize ( )
inline

◆ normalizeSafe()

template<class T , unsigned N>
Vec<T, N>& Freestyle::VecMat::Vec< T, N >::normalizeSafe ( )
inline

◆ operator!=()

template<class T , unsigned N>
bool Freestyle::VecMat::Vec< T, N >::operator!= ( const Vec< T, N > &  v) const
inline

Definition at line 220 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, and v.

◆ operator*() [1/2]

template<class T , unsigned N>
Vec<T, N> Freestyle::VecMat::Vec< T, N >::operator* ( const typename Vec< T, N >::value_type  r) const
inline

Definition at line 140 of file VecMat.h.

References r.

◆ operator*() [2/2]

template<class T , unsigned N>
value_type Freestyle::VecMat::Vec< T, N >::operator* ( const Vec< T, N > &  v) const
inline

Definition at line 157 of file VecMat.h.

References N, sum(), and v.

◆ operator*=()

template<class T , unsigned N>
template<class U >
Vec<T, N>& Freestyle::VecMat::Vec< T, N >::operator*= ( const U  r)
inline

Definition at line 192 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, and r.

◆ operator+()

template<class T , unsigned N>
Vec<T, N> Freestyle::VecMat::Vec< T, N >::operator+ ( const Vec< T, N > &  v) const
inline

Definition at line 126 of file VecMat.h.

References v.

◆ operator+=()

template<class T , unsigned N>
template<class U >
Vec<T, N>& Freestyle::VecMat::Vec< T, N >::operator+= ( const Vec< U, N > &  v)
inline

Definition at line 176 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, T, and v.

◆ operator-()

template<class T , unsigned N>
Vec<T, N> Freestyle::VecMat::Vec< T, N >::operator- ( const Vec< T, N > &  v) const
inline

Definition at line 133 of file VecMat.h.

References v.

◆ operator-=()

template<class T , unsigned N>
template<class U >
Vec<T, N>& Freestyle::VecMat::Vec< T, N >::operator-= ( const Vec< U, N > &  v)
inline

Definition at line 184 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, T, and v.

◆ operator/()

template<class T , unsigned N>
Vec<T, N> Freestyle::VecMat::Vec< T, N >::operator/ ( const typename Vec< T, N >::value_type  r) const
inline

Definition at line 147 of file VecMat.h.

References r.

◆ operator/=()

template<class T , unsigned N>
template<class U >
Vec<T, N>& Freestyle::VecMat::Vec< T, N >::operator/= ( const U  r)
inline

Definition at line 200 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, and r.

◆ operator<()

template<class T , unsigned N>
bool Freestyle::VecMat::Vec< T, N >::operator< ( const Vec< T, N > &  v) const
inline

Definition at line 230 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, and v.

◆ operator=()

template<class T , unsigned N>
template<class U >
Vec<T, N>& Freestyle::VecMat::Vec< T, N >::operator= ( const Vec< U, N > &  v)
inline

Definition at line 166 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, T, and v.

◆ operator==()

template<class T , unsigned N>
bool Freestyle::VecMat::Vec< T, N >::operator== ( const Vec< T, N > &  v) const
inline

Definition at line 210 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, and v.

◆ operator>()

template<class T , unsigned N>
bool Freestyle::VecMat::Vec< T, N >::operator> ( const Vec< T, N > &  v) const
inline

Definition at line 246 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord, N, and v.

◆ operator[]() [1/2]

template<class T , unsigned N>
value_type& Freestyle::VecMat::Vec< T, N >::operator[] ( const unsigned  i)
inline

Definition at line 84 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord.

◆ operator[]() [2/2]

template<class T , unsigned N>
value_type Freestyle::VecMat::Vec< T, N >::operator[] ( const unsigned  i) const
inline

Definition at line 79 of file VecMat.h.

References Freestyle::VecMat::Vec< T, N >::_coord.

◆ squareNorm()

template<class T , unsigned N>
value_type Freestyle::VecMat::Vec< T, N >::squareNorm ( ) const
inline

Member Data Documentation

◆ _coord

template<class T , unsigned N>
value_type Freestyle::VecMat::Vec< T, N >::_coord[N]
protected

The documentation for this class was generated from the following file: