Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

ntl_vector3dim.h File Reference

#include <iostream>
#include <map>
#include <vector>
#include <string>
#include <sstream>
#include <math.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <float.h>

Go to the source code of this file.

Classes

class  ntlVector3Dim< Scalar >

Defines

#define __FLT_MAX__   3.402823466e+38f
#define __DBL_MAX__   1.7976931348623158e+308
#define M_PI   3.1415926536
#define M_E   2.7182818284
#define GFX_PRECISION   1
#define GFX_REAL_MAX   __FLT_MAX__
#define VECTOR_EPSILON   (1e-5f)
#define HAVE_GFXTYPES
#define VECTOR_TYPE   ntlVector3Dim<Scalar>

Typedefs

typedef ntlVector3Dim< double > ntlVec3d
typedef ntlVector3Dim< float > ntlVec3f
typedef ntlVector3Dim< int > ntlVec3i
typedef ntlVec3f ntlColor
typedef float gfxReal
typedef double gfxDouble
typedef ntlVector3Dim< gfxRealntlVec3Gfx

Functions

template<class Scalar >
std::ostream & operator<< (std::ostream &os, const ntlVector3Dim< Scalar > &i)
template<class Scalar >
std::istream & operator>> (std::istream &is, ntlVector3Dim< Scalar > &i)
template<class Scalar >
Scalar dot (const ntlVector3Dim< Scalar > &t, const ntlVector3Dim< Scalar > &v)
template<class Scalar >
ntlVector3Dim< Scalar > cross (const ntlVector3Dim< Scalar > &t, const ntlVector3Dim< Scalar > &v)
template<class T >
ntlVec3d vec2D (T v)
template<class T >
ntlVec3f vec2F (T v)
template<class T >
ntlColor vec2Col (T v)
template<class T >
ntlVec3Gfx vec2G (T v)
gfxReal getVecEpsilon ()
template<class Scalar >
Scalar norm (const VECTOR_TYPE &v)
template<class Scalar >
Scalar normNoSqrt (const VECTOR_TYPE &v)
template<class Scalar >
VECTOR_TYPE getNormalized (const VECTOR_TYPE &v)
template<class Scalar >
Scalar normalize (VECTOR_TYPE &v)
template<class Scalar >
VECTOR_TYPE reflectVector (const VECTOR_TYPE &t, const VECTOR_TYPE &n)
template<class Scalar >
VECTOR_TYPE refractVector (const VECTOR_TYPE &t, const VECTOR_TYPE &normal, Scalar nt, Scalar nair, int &refRefl)
template<class Scalar >
bool equal (const VECTOR_TYPE &v, const VECTOR_TYPE &c)
template<class Scalar >
void rgbToHsv (VECTOR_TYPE &V)
template<class Scalar >
void hsvToRgb (VECTOR_TYPE &V)

Variables

const char * globVecFormatStr
 global string for formatting vector output in utilities.cpp

Detailed Description

Definition in file ntl_vector3dim.h.


Define Documentation

#define __DBL_MAX__   1.7976931348623158e+308

Definition at line 93 of file ntl_vector3dim.h.

#define __FLT_MAX__   3.402823466e+38f

Definition at line 86 of file ntl_vector3dim.h.

#define GFX_PRECISION   1

Definition at line 827 of file ntl_vector3dim.h.

#define GFX_REAL_MAX   __FLT_MAX__
#define HAVE_GFXTYPES

Definition at line 862 of file ntl_vector3dim.h.

#define M_E   2.7182818284

Definition at line 99 of file ntl_vector3dim.h.

#define M_PI   3.1415926536

Definition at line 98 of file ntl_vector3dim.h.

#define VECTOR_EPSILON   (1e-5f)
#define VECTOR_TYPE   ntlVector3Dim<Scalar>

Definition at line 871 of file ntl_vector3dim.h.

Referenced by getNormalized(), and reflectVector().


Typedef Documentation

typedef double gfxDouble

Definition at line 851 of file ntl_vector3dim.h.

typedef float gfxReal

Definition at line 833 of file ntl_vector3dim.h.

typedef ntlVec3f ntlColor

Definition at line 798 of file ntl_vector3dim.h.

typedef ntlVector3Dim<double> ntlVec3d

Definition at line 789 of file ntl_vector3dim.h.

typedef ntlVector3Dim<float> ntlVec3f

Definition at line 792 of file ntl_vector3dim.h.

Definition at line 854 of file ntl_vector3dim.h.

typedef ntlVector3Dim<int> ntlVec3i

Definition at line 795 of file ntl_vector3dim.h.


Function Documentation

template<class Scalar >
ntlVector3Dim<Scalar> cross ( const ntlVector3Dim< Scalar > &  t,
const ntlVector3Dim< Scalar > &  v 
) [inline]

Definition at line 689 of file ntl_vector3dim.h.

template<class Scalar >
Scalar dot ( const ntlVector3Dim< Scalar > &  t,
const ntlVector3Dim< Scalar > &  v 
) [inline]

Definition at line 678 of file ntl_vector3dim.h.

template<class Scalar >
bool equal ( const VECTOR_TYPE &  v,
const VECTOR_TYPE &  c 
) [inline]
template<class Scalar >
VECTOR_TYPE getNormalized ( const VECTOR_TYPE &  v) [inline]
gfxReal getVecEpsilon ( ) [inline]
template<class Scalar >
void hsvToRgb ( VECTOR_TYPE &  V) [inline]

Definition at line 1051 of file ntl_vector3dim.h.

References g, and p.

template<class Scalar >
Scalar norm ( const VECTOR_TYPE &  v) [inline]

Definition at line 879 of file ntl_vector3dim.h.

References fabs(), sqrt(), and VECTOR_EPSILON.

Referenced by LbmFsgrSolver::adaptTimestep(), add_node(), LbmFsgrSolver::advanceParticles(), axisProjection(), BL_SkinDeformer::BGEDeformVerts(), BLI_edgefill(), btShapeHull::buildHull(), ntlScene::buildScene(), C_Matrix_OrthoProjection(), C_Matrix_Scale(), btMinkowskiPenetrationDepthSolver::calcPenDepth(), ntlGeometryObject::calcTriangleDivs(), ntlGeometryObjModel::calcTriangleDivs(), Parametrizer::calculateAllMissingValues(), btConeTwistConstraint::computeConeLimitInfo(), IsoSurface::computeNormals(), MeanValueMeshCoords::computeWeights(), ntlMatrix4x4< Scalar >::decompose(), DM_calc_auto_bump_scale(), eff_calc_visibility(), Eigenhqr2(), LbmFsgrSolver::fineAdvance(), RAS_OpenGLRasterizer::FlushDebugShapes(), GetNormal(), btConeTwistConstraint::GetPointForAngle(), KDL::Rotation::GetXZRot(), ControlParticles::initFromMVCMesh(), LbmFsgrSolver::initGeometryFlags(), LbmFsgrSolver::initializeSolverGrids(), LbmFsgrSolver::initLevelOmegas(), LbmFsgrSolver::LbmFsgrSolver(), M_Noise_random_unit_vector(), LbmFsgrSolver::mainLoop(), minimize(), normalize(), ntlTriangle::ntlTriangle(), p_abf_compute_gradient(), p_chart_abf_solve(), planeProjection(), AUD_LowpassFactory::recalculateCoefficients(), AUD_HighpassFactory::recalculateCoefficients(), AUD_ButterworthFactory::recalculateCoefficients(), ntlWorld::renderScene(), IsoSurface::smoothNormals(), IsoSurface::smoothSurface(), iTaSC::WSDLSSolver::solve(), iTaSC::WDLSSolver::solve(), btSoftColliders::ClusterBase::SolveContact(), traceray(), IsoSurface::triangulate(), iTaSC::updateJoint(), and view3d_align_axis_to_vector().

template<class Scalar >
Scalar normalize ( VECTOR_TYPE &  v) [inline]

Definition at line 921 of file ntl_vector3dim.h.

References fabs(), norm(), sqrt(), and VECTOR_EPSILON.

template<class Scalar >
Scalar normNoSqrt ( const VECTOR_TYPE &  v) [inline]
template<class Scalar >
std::ostream& operator<< ( std::ostream &  os,
const ntlVector3Dim< Scalar > &  i 
)

Definition at line 217 of file ntl_vector3dim.h.

References globVecFormatStr, and i.

template<class Scalar >
std::istream& operator>> ( std::istream &  is,
ntlVector3Dim< Scalar > &  i 
)

Definition at line 234 of file ntl_vector3dim.h.

template<class Scalar >
VECTOR_TYPE reflectVector ( const VECTOR_TYPE &  t,
const VECTOR_TYPE &  n 
) [inline]

Definition at line 949 of file ntl_vector3dim.h.

References dot(), and VECTOR_TYPE.

Referenced by ntlRay::shade().

template<class Scalar >
VECTOR_TYPE refractVector ( const VECTOR_TYPE &  t,
const VECTOR_TYPE &  normal,
Scalar  nt,
Scalar  nair,
int &  refRefl 
) [inline]

Definition at line 962 of file ntl_vector3dim.h.

References dot(), and sqrt().

Referenced by ntlRay::shade().

template<class Scalar >
void rgbToHsv ( VECTOR_TYPE &  V) [inline]

Definition at line 1011 of file ntl_vector3dim.h.

template<class T >
ntlColor vec2Col ( v) [inline]

Definition at line 803 of file ntl_vector3dim.h.

template<class T >
ntlVec3d vec2D ( v) [inline]
template<class T >
ntlVec3f vec2F ( v) [inline]

Definition at line 802 of file ntl_vector3dim.h.

template<class T >
ntlVec3Gfx vec2G ( v) [inline]

Variable Documentation

const char* globVecFormatStr

global string for formatting vector output in utilities.cpp

Definition at line 82 of file utilities.cpp.

Referenced by BasicVector::operator<<(), and operator<<().