MeshIO.cpp File Reference

#include "PreCompiled.h"
#include "Definitions.h"
#include "Iterator.h"
#include "MeshKernel.h"
#include "MeshIO.h"
#include "Builder.h"
#include <Base/Console.h>
#include <Base/Exception.h>
#include <Base/Reader.h>
#include <Base/Writer.h>
#include <Base/FileInfo.h>
#include <Base/Sequencer.h>
#include <Base/Stream.h>
#include <zipios++/gzipoutputstream.h>
#include <math.h>
#include <sstream>
#include <iomanip>
#include <boost/regex.hpp>

Go to the source code of this file.

Classes

struct  _Quaternion
struct  _Vector
class  MeshVRML
struct  NODE
struct  QUAD
struct  TRIA

Defines

#define VAdd(v1, v2, r)
#define VCross(v1, v2, r)
#define VDot(v1, v2)   ((v1).x*(v2).x + (v1).y*(v2).y + (v1).z*(v2).z)
#define VMod(v)   (sqrt((v).x*(v).x + (v).y*(v).y + (v).z*(v).z))
#define VNew(a, b, c, r)   ((r).x = (a), (r).y = (b), (r).z = (c))
#define VScalarMul(v, d, r)
#define VSub(v1, v2, r)
#define VUnit(v, t, r)

Typedefs

typedef struct _Quaternion Quaternion
typedef struct _Vector Vector
typedef struct _VectorVectorPtr

Functions

Quaternion Build_Rotate_Quaternion (Vector axis, double cos_angle)
static void Convert_Camera_Model (Vector *pos, Vector *at, Vector *up, Vector *res_axis, double *res_angle)
std::string & ltrim (std::string &str)
char * ltrim (char *psz)
int numDigits (int number)
static Quaternion QQMul (Quaternion *q1, Quaternion *q2)
static void Quaternion_To_Axis_Angle (Quaternion *q, Vector *axis, double *angle)
std::string & upper (std::string &str)
char * upper (char *string)

Define Documentation

#define VAdd ( v1,
v2,
 ) 
Value:
((r).x = (v1).x + (v2).x , \
                                                         (r).y = (v1).y + (v2).y , \
                                                         (r).z = (v1).z + (v2).z )

Definition at line 130 of file MeshIO.cpp.

Referenced by QQMul().

#define VCross ( v1,
v2,
 ) 
Value:
((r).x = (v1).y * (v2).z - (v1).z * (v2).y , \
                                                         (r).y = (v1).z * (v2).x - (v1).x * (v2).z , \
                                                         (r).z = (v1).x * (v2).y - (v1).y * (v2).x )

Definition at line 138 of file MeshIO.cpp.

Referenced by Convert_Camera_Model(), and QQMul().

#define VDot ( v1,
v2   )     ((v1).x*(v2).x + (v1).y*(v2).y + (v1).z*(v2).z)

Definition at line 125 of file MeshIO.cpp.

Referenced by Convert_Camera_Model(), and QQMul().

#define VMod (  )     (sqrt((v).x*(v).x + (v).y*(v).y + (v).z*(v).z))

Definition at line 122 of file MeshIO.cpp.

#define VNew ( a,
b,
c,
 )     ((r).x = (a), (r).y = (b), (r).z = (c))

Definition at line 128 of file MeshIO.cpp.

Referenced by Convert_Camera_Model(), and Quaternion_To_Axis_Angle().

#define VScalarMul ( v,
d,
 ) 
Value:
((r).x = (v).x * (d) , \
                                                         (r).y = (v).y * (d) , \
                                                         (r).z = (v).z * (d) )

Definition at line 142 of file MeshIO.cpp.

Referenced by Build_Rotate_Quaternion(), Convert_Camera_Model(), QQMul(), and Quaternion_To_Axis_Angle().

#define VSub ( v1,
v2,
 ) 
Value:
((r).x = (v1).x - (v2).x , \
                                                         (r).y = (v1).y - (v2).y , \
                                                         (r).z = (v1).z - (v2).z )

Definition at line 134 of file MeshIO.cpp.

Referenced by Convert_Camera_Model().

#define VUnit ( v,
t,
 ) 
Value:
((t) = 1 / VMod(v) , \
                                                         VScalarMul(v, t, r) )

Definition at line 146 of file MeshIO.cpp.

Referenced by Convert_Camera_Model().


Typedef Documentation

typedef struct _Quaternion Quaternion
typedef struct _Vector Vector
typedef struct _Vector * VectorPtr

Function Documentation

Quaternion Build_Rotate_Quaternion ( Vector  axis,
double  cos_angle 
)
static void Convert_Camera_Model ( Vector pos,
Vector at,
Vector up,
Vector res_axis,
double *  res_angle 
) [static]
std::string& ltrim ( std::string &  str  ) 

Definition at line 83 of file MeshIO.cpp.

References RobotExample::pos.

char* ltrim ( char *  psz  ) 

Definition at line 63 of file MeshIO.cpp.

Referenced by MeshCore::MeshInput::LoadNastran().

int numDigits ( int  number  ) 

Definition at line 96 of file MeshIO.cpp.

References Py::abs().

static Quaternion QQMul ( Quaternion q1,
Quaternion q2 
) [static]

Definition at line 176 of file MeshIO.cpp.

References _Quaternion::real_part, VAdd, VCross, VDot, _Quaternion::vect_part, and VScalarMul.

Referenced by Convert_Camera_Model().

static void Quaternion_To_Axis_Angle ( Quaternion q,
Vector axis,
double *  angle 
) [static]
std::string& upper ( std::string &  str  ) 

Definition at line 76 of file MeshIO.cpp.

char* upper ( char *  string  ) 

Generated on Wed Nov 23 19:01:18 2011 for FreeCAD by  doxygen 1.6.1