FacetTriData Class Reference

#include <FacetBaseData.h>

Collaboration diagram for FacetTriData:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 FacetTriData (int n=0)
virtual ~FacetTriData (void)
void init (void)
void execScale (double x, double y, double z)
void execShift (double x, double y, double z)
void execRotate (Quaternion< double > q)
void ComputeTriNormal ()

Public Attributes

int facetNum
Vector< double > v1
Vector< double > v2
Vector< double > v3
Vector< double > n1
Vector< double > n2
Vector< double > n3
UVMap< double > uv1
UVMap< double > uv2
UVMap< double > uv3

Detailed Description

Definition at line 74 of file FacetBaseData.h.


Constructor & Destructor Documentation

FacetTriData ( int  n = 0  )  [inline]

Definition at line 84 of file FacetBaseData.h.

References FacetTriData::facetNum, and FacetTriData::init().

00084 { init(); facetNum = n;}

Here is the call graph for this function:

virtual ~FacetTriData ( void   )  [inline, virtual]

Definition at line 85 of file FacetBaseData.h.

00085 {}


Member Function Documentation

void ComputeTriNormal (  )  [inline]

Definition at line 93 of file FacetBaseData.h.

References FacetTriData::n1, FacetTriData::n2, FacetTriData::n3, jbxl::NewellMethod(), Vector< T >::normalize(), FacetTriData::v1, FacetTriData::v2, and FacetTriData::v3.

00093 { Vector<double> nv = NewellMethod(v1, v2, v3); nv.normalize(); n1 = n2 = n3 = nv;}

Here is the call graph for this function:

void execRotate ( Quaternion< double >  q  ) 

Definition at line 65 of file FacetBaseData.cpp.

References Quaternion< T >::execRotation(), FacetTriData::n1, FacetTriData::n2, FacetTriData::n3, FacetTriData::v1, FacetTriData::v2, and FacetTriData::v3.

00066 {
00067     v1 = q.execRotation(v1);
00068     v2 = q.execRotation(v2);
00069     v3 = q.execRotation(v3);
00070     n1 = q.execRotation(n1);
00071     n2 = q.execRotation(n2);
00072     n3 = q.execRotation(n3);
00073 }

Here is the call graph for this function:

void execScale ( double  x,
double  y,
double  z 
)

Definition at line 50 of file FacetBaseData.cpp.

References FacetTriData::v1, FacetTriData::v2, FacetTriData::v3, Vector< T >::x, Vector< T >::y, and Vector< T >::z.

00051 {
00052     v1.x *= x;
00053     v1.y *= y;
00054     v1.z *= z;
00055     v2.x *= x;
00056     v2.y *= y;
00057     v2.z *= z;
00058     v3.x *= x;
00059     v3.y *= y;
00060     v3.z *= z;
00061 }

void execShift ( double  x,
double  y,
double  z 
) [inline]

Definition at line 91 of file FacetBaseData.h.

References FacetTriData::v1, FacetTriData::v2, and FacetTriData::v3.

00091 { Vector<double> m(x, y, z); v1 = v1 + m; v2 = v2 + m; v3 = v3 + m;}

void init ( void   ) 

Definition at line 33 of file FacetBaseData.cpp.

References FacetTriData::facetNum, UVMap< T >::init(), Vector< T >::init(), FacetTriData::n1, FacetTriData::n2, FacetTriData::n3, FacetTriData::uv1, FacetTriData::uv2, FacetTriData::uv3, FacetTriData::v1, FacetTriData::v2, and FacetTriData::v3.

Referenced by FacetTriData::FacetTriData().

00034 {
00035     facetNum = 0;
00036 
00037     v1.init();
00038     v2.init();
00039     v3.init();
00040     n1.init();
00041     n2.init();
00042     n3.init();
00043     uv1.init();
00044     uv2.init();
00045     uv3.init();
00046 }

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

int facetNum

Definition at line 77 of file FacetBaseData.h.

Referenced by FacetTriData::FacetTriData(), and FacetTriData::init().

Vector<double> n1
Vector<double> n2
Vector<double> n3
UVMap<double> uv1

Definition at line 81 of file FacetBaseData.h.

Referenced by FacetTriData::init().

UVMap<double> uv2

Definition at line 81 of file FacetBaseData.h.

Referenced by FacetTriData::init().

UVMap<double> uv3

Definition at line 81 of file FacetBaseData.h.

Referenced by FacetTriData::init().

Vector<double> v1
Vector<double> v2
Vector<double> v3

The documentation for this class was generated from the following files:

Generated on 15 Nov 2023 for JunkBox_Lib++ (for Windows) by  doxygen 1.6.1