#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 _Vector * | VectorPtr |
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 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) |
Definition at line 125 of file MeshIO.cpp.
Referenced by Convert_Camera_Model(), and QQMul().
#define VMod | ( | v | ) | (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 | ) | ((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, | |||||
r | ) |
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, | |||||
r | ) |
Definition at line 134 of file MeshIO.cpp.
Referenced by Convert_Camera_Model().
#define VUnit | ( | v, | |||
t, | |||||
r | ) |
((t) = 1 / VMod(v) , \ VScalarMul(v, t, r) )
Definition at line 146 of file MeshIO.cpp.
Referenced by Convert_Camera_Model().
typedef struct _Quaternion Quaternion |
Quaternion Build_Rotate_Quaternion | ( | Vector | axis, | |
double | cos_angle | |||
) |
Definition at line 155 of file MeshIO.cpp.
References KDL::acos(), draftlibs::fcvec::angle(), KDL::cos(), _Quaternion::real_part, KDL::sin(), _Quaternion::vect_part, and VScalarMul.
Referenced by Convert_Camera_Model().
static void Convert_Camera_Model | ( | Vector * | pos, | |
Vector * | at, | |||
Vector * | up, | |||
Vector * | res_axis, | |||
double * | res_angle | |||
) | [static] |
Definition at line 211 of file MeshIO.cpp.
References Build_Rotate_Quaternion(), QQMul(), Quaternion_To_Axis_Angle(), _Quaternion::real_part, VCross, VDot, _Quaternion::vect_part, VNew, VScalarMul, VSub, and VUnit.
Referenced by MeshVRML::Save(), and MeshVRML::WriteVRMLViewpoints().
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] |
Definition at line 193 of file MeshIO.cpp.
References KDL::acos(), _Quaternion::real_part, KDL::sin(), _Quaternion::vect_part, VNew, and VScalarMul.
Referenced by Convert_Camera_Model().
std::string& upper | ( | std::string & | str | ) |
Definition at line 76 of file MeshIO.cpp.
char* upper | ( | char * | string | ) |
Definition at line 49 of file MeshIO.cpp.
References RobotExample::l.
Referenced by Part::TopoShapePy::hashCode(), MeshCore::MeshInput::LoadNastran(), MeshCore::MeshInput::LoadSTL(), and Gui::PropertyEditor::PropertyItem::setPropertyName().