From 0ea5fc66924303d1bf73ba283a383e2aadee02f2 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sat, 11 Aug 2018 20:21:34 +0200 Subject: Initial commit --- docs/doxygen/nel/class_NLMISC__CVector.html | 1410 +++++++++++++++++++++++++++ 1 file changed, 1410 insertions(+) create mode 100644 docs/doxygen/nel/class_NLMISC__CVector.html (limited to 'docs/doxygen/nel/class_NLMISC__CVector.html') diff --git a/docs/doxygen/nel/class_NLMISC__CVector.html b/docs/doxygen/nel/class_NLMISC__CVector.html new file mode 100644 index 00000000..603dbe74 --- /dev/null +++ b/docs/doxygen/nel/class_NLMISC__CVector.html @@ -0,0 +1,1410 @@ + + + + nevrax.org : docs + + + + + + + + + + + + + + +
# Home   # nevrax.com   
+ + + + +
Nevrax
+ + + + + + + + + + +
+ + +
+ Nevrax.org
+ + + + + + + +
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
+
+ + +
+ + +
+Docs + +
+  + + + + + +
Documentation 
+ +
+Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  
+

NLMISC::CVector Class Reference

A 3D vector of float. +More... +

+#include <vector.h> +

+Collaboration diagram for NLMISC::CVector:

Collaboration graph
+ + +
[legend]
List of all members. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

Public Methods

std::string asString () const
 Returns the contents as a printable string "x y z". More...

Object.
 CVector ()
 Constructor wich do nothing. More...

 CVector (float _x, float _y, float _z)
 Constructor . More...

 CVector (const CVector &v)
 Copy Constructor. More...

Base Maths.
CVector& operator+= (const CVector &v)
CVector& operator-= (const CVector &v)
CVector& operator *= (float f)
CVector& operator/= (float f)
CVector operator+ (const CVector &v) const
CVector operator- (const CVector &v) const
CVector operator * (float f) const
CVector operator/ (float f) const
CVector operator- () const
Advanced Maths.
float operator * (const CVector &v) const
 Dot product. More...

CVector operator^ (const CVector &v) const
 Cross product. More...

float norm () const
 Return the norm of the vector. More...

float sqrnorm () const
 Return the square of the norm of the vector. More...

void normalize ()
 Normalize the vector. More...

CVector normed () const
 Return the vector normalized. More...

Misc.
void set (float _x, float _y, float _z)
bool operator== (const CVector &v) const
bool operator!= (const CVector &v) const
bool isNull () const
bool operator< (const CVector &v) const
 This operator is here just for map/set insertion(no meaning). comparison order is x,y,z. More...

void sphericToCartesian (float r, float theta,float phi)
 Setup the vector with spheric coordinates. More...

void cartesianToSpheric (float &r, float &theta,float &phi) const
 Get the sphreic coordinates of the vector. More...

void minof (const CVector &a, const CVector &b)
 Set all vector x/y/z as minimum of a/b x/y/z (respectively). More...

void maxof (const CVector &a, const CVector &b)
 Set all vector x/y/z as maximum of a/b x/y/z (respectively). More...

void serial (IStream &f)
 serial. More...


Public Attributes

float x
float y
float z

Static Public Attributes

const CVector Null
 Null vector (0,0,0). More...

const CVector I
 I vector (1,0,0). More...

const CVector J
 J vector (0,1,0). More...

const CVector K
 K vector (0,0,1). More...


Friends

CVector operator * (float f, const CVector &v0)
+

Detailed Description

+A 3D vector of float. +

+

+Author(s):
+ Lionel Berenguier , Nevrax France
+Date:
+ 2000
+

+ +

+Definition at line 46 of file vector.h.


Constructor & Destructor Documentation

+

+ + + + +
+ + + + + + +
+NLMISC::CVector::CVector ( + +) [inline] +
+
+ + + + + +
+   + + +

+Constructor wich do nothing. +

+ +

+Definition at line 65 of file vector.h.

+

+ + + + +
+ + + + + + + + + + + + + + +
+NLMISC::CVector::CVector ( + +float _x, +
+float _y, +
+float _z ) [inline] +
+
+ + + + + +
+   + + +

+Constructor . +

+ +

+Definition at line 67 of file vector.h.

+

+ + + + +
+ + + + + + +
+NLMISC::CVector::CVector ( + +const CVector & v ) [inline] +
+
+ + + + + +
+   + + +

+Copy Constructor. +

+ +

+Definition at line 69 of file vector.h.

+


Member Function Documentation

+

+ + + + +
+ + + + + + +
+string NLMISC::CVector::asString ( + +) const +
+
+ + + + + +
+   + + +

+Returns the contents as a printable string "x y z". +

+ +

+Definition at line 44 of file vector.cpp.

+

+ + + + +
+ + + + + + + + + + + + + + +
+void NLMISC::CVector::cartesianToSpheric ( + +float & r, +
+float & theta, +
+float & phi ) const [inline] +
+
+ + + + + +
+   + + +

+Get the sphreic coordinates of the vector. +

+See sphericToCartesian() to know coordinates conventions.

+See also:
+ sphericToCartesian()
+

+Definition at line 161 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+bool NLMISC::CVector::isNull ( + +) const [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 148 of file vector_inline.h.

+

+ + + + +
+ + + + + + + + + + +
+void NLMISC::CVector::maxof ( + +const CVector & a, +
+const CVector & b ) [inline] +
+
+ + + + + +
+   + + +

+Set all vector x/y/z as maximum of a/b x/y/z (respectively). +

+ +

+Definition at line 192 of file vector_inline.h.

+

+ + + + +
+ + + + + + + + + + +
+void NLMISC::CVector::minof ( + +const CVector & a, +
+const CVector & b ) [inline] +
+
+ + + + + +
+   + + +

+Set all vector x/y/z as minimum of a/b x/y/z (respectively). +

+ +

+Definition at line 186 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+float NLMISC::CVector::norm ( + +) const [inline] +
+
+ + + + + +
+   + + +

+Return the norm of the vector. +

+ +

+Definition at line 115 of file vector_inline.h. +

+Referenced by NLPACS::CRetrieverInstance::link().

+

+ + + + +
+ + + + + + +
+void NLMISC::CVector::normalize ( + +) [inline] +
+
+ + + + + +
+   + + +

+Normalize the vector. +

+ +

+Definition at line 119 of file vector_inline.h. +

+Referenced by NLAIAGENT::IVector::unit().

+

+ + + + +
+ + + + + + +
+CVector NLMISC::CVector::normed ( + +) const [inline] +
+
+ + + + + +
+   + + +

+Return the vector normalized. +

+ +

+Definition at line 125 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+float NLMISC::CVector::operator * ( + +const CVector & v ) const [inline] +
+
+ + + + + +
+   + + +

+Dot product. +

+ +

+Definition at line 97 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector NLMISC::CVector::operator * ( + +float f ) const [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 75 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector & NLMISC::CVector::operator *= ( + +float f ) [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 54 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+bool NLMISC::CVector::operator!= ( + +const CVector & v ) const [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 144 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector NLMISC::CVector::operator+ ( + +const CVector & v ) const [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 65 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector & NLMISC::CVector::operator+= ( + +const CVector & v ) [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 40 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector NLMISC::CVector::operator- ( + +) const [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 84 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector NLMISC::CVector::operator- ( + +const CVector & v ) const [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 70 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector & NLMISC::CVector::operator-= ( + +const CVector & v ) [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 47 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector NLMISC::CVector::operator/ ( + +float f ) const [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 80 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector & NLMISC::CVector::operator/= ( + +float f ) [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 61 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+bool NLMISC::CVector::operator< ( + +const CVector & v ) const [inline] +
+
+ + + + + +
+   + + +

+This operator is here just for map/set insertion(no meaning). comparison order is x,y,z. +

+ +

+Definition at line 152 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+bool NLMISC::CVector::operator== ( + +const CVector & v ) const [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 140 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+CVector NLMISC::CVector::operator^ ( + +const CVector & v ) const [inline] +
+
+ + + + + +
+   + + +

+Cross product. +

+compute the cross product *this ^ v. +

+Definition at line 101 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+void NLMISC::CVector::serial ( + +IStream & f ) [inline] +
+
+ + + + + +
+   + + +

+serial. +

+ +

+Definition at line 198 of file vector_inline.h.

+

+ + + + +
+ + + + + + + + + + + + + + +
+void NLMISC::CVector::set ( + +float _x, +
+float _y, +
+float _z ) [inline] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 136 of file vector_inline.h.

+

+ + + + +
+ + + + + + + + + + + + + + +
+void NLMISC::CVector::sphericToCartesian ( + +float r, +
+float theta, +
+float phi ) [inline] +
+
+ + + + + +
+   + + +

+Setup the vector with spheric coordinates. +

+sphericToCartesian(1,0,0) build the I vector ((1,0,0)). the formula is:
+ x= r*cos(theta)*cos(phi)
+ y= r*sin(theta)*cos(phi)
+ z= r*sin(phi)
+

+See also:
+ cartesianToSpheric()
+

+Definition at line 175 of file vector_inline.h.

+

+ + + + +
+ + + + + + +
+float NLMISC::CVector::sqrnorm ( + +) const [inline] +
+
+ + + + + +
+   + + +

+Return the square of the norm of the vector. +

+ +

+Definition at line 111 of file vector_inline.h.

+


Friends And Related Function Documentation

+

+ + + + +
+ + + + + + + + + + +
+CVector operator * ( + +float f, +
+const CVector & v ) [friend] +
+
+ + + + + +
+   + + +

+ +

+Definition at line 88 of file vector_inline.h.

+


Member Data Documentation

+

+ + + + +
+ + + + + +
+const CVector NLMISC::CVector::I [static] +
+
+ + + + + +
+   + + +

+I vector (1,0,0). +

+ +

+Definition at line 55 of file vector.h.

+

+ + + + +
+ + + + + +
+const CVector NLMISC::CVector::J [static] +
+
+ + + + + +
+   + + +

+J vector (0,1,0). +

+ +

+Definition at line 57 of file vector.h.

+

+ + + + +
+ + + + + +
+const CVector NLMISC::CVector::K [static] +
+
+ + + + + +
+   + + +

+K vector (0,0,1). +

+ +

+Definition at line 59 of file vector.h.

+

+ + + + +
+ + + + + +
+const CVector NLMISC::CVector::Null [static] +
+
+ + + + + +
+   + + +

+Null vector (0,0,0). +

+ +

+Definition at line 53 of file vector.h.

+

+ + + + +
+ + + + + +
+float NLMISC::CVector::x +
+
+ + + + + +
+   + + +

+ +

+Definition at line 49 of file vector.h.

+

+ + + + +
+ + + + + +
+float NLMISC::CVector::y +
+
+ + + + + +
+   + + +

+ +

+Definition at line 49 of file vector.h.

+

+ + + + +
+ + + + + +
+float NLMISC::CVector::z +
+
+ + + + + +
+   + + +

+ +

+Definition at line 49 of file vector.h.

+


The documentation for this class was generated from the following files: + + + +
                                                                                                                                                                    +
+ + -- cgit v1.2.1