#include <FFaBody.H>
|
| FFaBody () |
|
size_t | getNoVertices () const |
|
size_t | getNoFaces () const |
|
bool | computeBoundingBox (FaVec3 &minX, FaVec3 &maxX) const |
|
bool | computeTotalVolume (double &Vb, FaVec3 &C0b, FFaTensor3 *Ib=NULL) const |
|
bool | computeVolumeBelow (double &Vb, double &As, FaVec3 &C0b, FaVec3 &C0s, const FaVec3 &normal, double z0, double zeroTol=1.0e-16) |
|
bool | saveIntersection (const FaMat34 &cs) |
|
bool | computeIncArea (double &dAs, FaVec3 &C0s, const FaVec3 &normal, const FaMat34 &cs) |
|
size_t | addFace (int v1, int v2, int v3, int v4=-1) |
|
size_t | addVertex (const FaVec3 &pos, double tol=-1.0) |
|
const FaVec3 & | getVertex (size_t idx) const |
|
int | getFaceVtx (size_t idx, int i) const |
|
bool | writeCAD (const std::string &fileName, const FaMat34 &partCS) const |
|
|
static FFaBody * | readSTL (std::istream &in, double duplTol) |
|
static FFaBody * | readCAD (std::istream &in) |
|
static FFaBody * | readWRL (std::istream &in, int version) |
|
static void | readWRL1 (FFaBody *&body, std::istream &in) |
|
static void | readWRL2 (FFaBody *&body, std::istream &in) |
|
static void | readChildren (FFaBody *&body, const FaMat34 &bodyCS, std::istream &in) |
|
static void | readTransform (FFaBody *&body, const FaMat34 &bodyCS, std::istream &in) |
|
static void | readShape (FFaBody *&body, const FaMat34 &bodyCS, std::istream &in) |
|
◆ FFaBody()
◆ addFace()
size_t FFaBody::addFace |
( |
int |
i1, |
|
|
int |
i2, |
|
|
int |
i3, |
|
|
int |
i4 = -1 |
|
) |
| |
Adds a face to the body definition.
◆ addVertex()
size_t FFaBody::addVertex |
( |
const FaVec3 & |
pos, |
|
|
double |
tol = -1.0 |
|
) |
| |
Adds a vertex to the body definition.
◆ computeBoundingBox()
bool FFaBody::computeBoundingBox |
( |
FaVec3 & |
minX, |
|
|
FaVec3 & |
maxX |
|
) |
| const |
Computes the bounding box of the body.
◆ computeIncArea()
bool FFaBody::computeIncArea |
( |
double & |
dAs, |
|
|
FaVec3 & |
C0s, |
|
|
const FaVec3 & |
normal, |
|
|
const FaMat34 & |
cs |
|
) |
| |
Computes the increment in the intersection area and the associated centroid. It is assumed that computeVolumeBelow already has been invoked before calling this method such that the current face intersections are available.
◆ computeTotalVolume()
bool FFaBody::computeTotalVolume |
( |
double & |
Vb, |
|
|
FaVec3 & |
C0b, |
|
|
FFaTensor3 * |
Ib = NULL |
|
) |
| const |
Computes the total volume, volume centroid, and optionally the volume inertia.
◆ computeVolumeBelow()
bool FFaBody::computeVolumeBelow |
( |
double & |
Vb, |
|
|
double & |
As, |
|
|
FaVec3 & |
C0b, |
|
|
FaVec3 & |
C0s, |
|
|
const FaVec3 & |
normal, |
|
|
double |
z0, |
|
|
double |
zeroTol = 1.0e-16 |
|
) |
| |
Computes the volume and centroid of the portion of the body that is below the plane defined by normal and z0. The area of the intersection surface and the associated centroid is also computed, if the body is intersected.
◆ getFaceVtx()
int FFaBody::getFaceVtx |
( |
size_t |
idx, |
|
|
int |
i |
|
) |
| const |
|
inline |
◆ getNoFaces()
size_t FFaBody::getNoFaces |
( |
| ) |
const |
|
inline |
◆ getNoVertices()
size_t FFaBody::getNoVertices |
( |
| ) |
const |
|
inline |
◆ getVertex()
const FaVec3& FFaBody::getVertex |
( |
size_t |
idx | ) |
const |
|
inline |
◆ readBody()
void FFaBody::readBody |
( |
std::istream & |
in, |
|
|
const FaMat34 & |
partCS |
|
) |
| |
|
protected |
◆ readCAD()
FFaBody * FFaBody::readCAD |
( |
std::istream & |
in | ) |
|
|
staticprotected |
◆ readChildren()
void FFaBody::readChildren |
( |
FFaBody *& |
body, |
|
|
const FaMat34 & |
bodyCS, |
|
|
std::istream & |
in |
|
) |
| |
|
staticprotected |
◆ readCoords()
void FFaBody::readCoords |
( |
std::istream & |
in, |
|
|
const FaMat34 & |
partCS, |
|
|
char |
endChar = '}' |
|
) |
| |
|
protected |
◆ readFace()
void FFaBody::readFace |
( |
std::istream & |
in | ) |
|
|
protected |
◆ readFaces()
void FFaBody::readFaces |
( |
std::istream & |
in, |
|
|
char |
endChar = '}' |
|
) |
| |
|
protected |
◆ readFromCAD()
FFaBody * FFaBody::readFromCAD |
( |
std::istream & |
in, |
|
|
double |
duplTol = -1.0 |
|
) |
| |
|
static |
This method administers the input of a body definition from a file. The body may either be defined on FT's internal CAD format, or on the external VRML or STL formats.
◆ readIndexedFaceSet()
void FFaBody::readIndexedFaceSet |
( |
std::istream & |
in, |
|
|
const FaMat34 & |
partCS |
|
) |
| |
|
protected |
◆ readShape()
void FFaBody::readShape |
( |
FFaBody *& |
body, |
|
|
const FaMat34 & |
bodyCS, |
|
|
std::istream & |
in |
|
) |
| |
|
staticprotected |
◆ readSTL()
FFaBody * FFaBody::readSTL |
( |
std::istream & |
in, |
|
|
double |
duplTol |
|
) |
| |
|
staticprotected |
◆ readTransform()
void FFaBody::readTransform |
( |
FFaBody *& |
body, |
|
|
const FaMat34 & |
bodyCS, |
|
|
std::istream & |
in |
|
) |
| |
|
staticprotected |
◆ readWRL()
FFaBody * FFaBody::readWRL |
( |
std::istream & |
in, |
|
|
int |
version |
|
) |
| |
|
staticprotected |
◆ readWRL1()
void FFaBody::readWRL1 |
( |
FFaBody *& |
body, |
|
|
std::istream & |
in |
|
) |
| |
|
staticprotected |
◆ readWRL2()
void FFaBody::readWRL2 |
( |
FFaBody *& |
body, |
|
|
std::istream & |
in |
|
) |
| |
|
staticprotected |
◆ saveIntersection()
bool FFaBody::saveIntersection |
( |
const FaMat34 & |
cs | ) |
|
Saves the loop of vertices defining the current intersection surface. The vertex coordinates of the loop are transformed to global coordinates using cs to facilitate comparison with a previous configuration.
◆ writeCAD()
bool FFaBody::writeCAD |
( |
const std::string & |
fileName, |
|
|
const FaMat34 & |
partCS |
|
) |
| const |
This method writes out the body definition on FT's internal CAD format.
◆ isBBoxComputed
bool FFaBody::isBBoxComputed |
|
mutableprivate |
◆ isVolumeComputed
char FFaBody::isVolumeComputed |
|
mutableprivate |
◆ myBBox
◆ myCentroid
◆ myFaces
std::vector<FaFace> FFaBody::myFaces |
|
private |
◆ myInertia
◆ myIntLoop
std::vector<FaEdge> FFaBody::myIntLoop |
|
private |
◆ myLoopVer
std::vector<FaVec3> FFaBody::myLoopVer |
|
private |
◆ myVertices
std::vector<FaVec3> FFaBody::myVertices |
|
private |
◆ myVolume
◆ myX0s
◆ prefix
std::string FFaBody::prefix |
|
static |
◆ startVx
The documentation for this class was generated from the following files: