#include <unitcube.h>
Public Member Functions | |
UnitCube () | |
~UnitCube () | |
ArrayOfVecDouble & | vertices () |
void | project_2d_points_into_faces (const VecDouble &pt2D, VecDouble *ppt3D, FaceDirection3D dir) |
void | face_base_vectors (Index FaceId, VecDouble *v1, VecDouble *v2) |
Static Public Member Functions | |
static unsigned | n_faces () |
static unsigned | n_vertices () |
Protected Attributes | |
VecDouble | e1 |
VecDouble | e2 |
VecDouble | e3 |
ArrayOfVecDouble | _vertices |
Definition at line 13 of file unitcube.h.
UnitCube::UnitCube | ( | ) |
Definition at line 5 of file unitcube.cpp.
00006 { 00007 //Set the unit vectors 00008 e1.reinit(3); 00009 e2.reinit(3); 00010 e3.reinit(3); 00011 00012 e1=0; 00013 e2=0; 00014 e3=0; 00015 00016 e1(0)=1; 00017 e2(1)=1; 00018 e3(2)=1; 00019 00020 //Set the vertices 00021 _vertices.reinit(8,3); 00022 _vertices(0,0) = 0; _vertices(0,1) = 0; _vertices(0,2) = 0; 00023 _vertices(1,0) = 1; _vertices(1,1) = 0; _vertices(1,2) = 0; 00024 _vertices(2,0) = 0; _vertices(2,1) = 1; _vertices(2,2) = 0; 00025 _vertices(3,0) = 1; _vertices(3,1) = 1; _vertices(3,2) = 0; 00026 _vertices(4,0) = 0; _vertices(4,1) = 0; _vertices(4,2) = 1; 00027 _vertices(5,0) = 1; _vertices(5,1) = 0; _vertices(5,2) = 1; 00028 _vertices(6,0) = 0; _vertices(6,1) = 1; _vertices(6,2) = 1; 00029 _vertices(7,0) = 1; _vertices(7,1) = 1; _vertices(7,2) = 1; 00030 00031 00032 00033 00034 00035 }
UnitCube::~UnitCube | ( | ) |
Definition at line 37 of file unitcube.cpp.
Definition at line 67 of file unitcube.cpp.
00068 { 00069 if (faceId < 2) 00070 { 00071 (*v1)=e2; 00072 (*v2)=e3; 00073 return; 00074 } 00075 if (faceId < 4) 00076 { 00077 (*v1)=e1; 00078 (*v2)=e3; 00079 return; 00080 } 00081 if (faceId < 7) 00082 { 00083 (*v1)=e1; 00084 (*v2)=e2; 00085 return; 00086 } 00087 assert(0); //Invalid faceId 00088 return; 00089 }
static unsigned UnitCube::n_faces | ( | ) | [inline, static] |
Definition at line 25 of file unitcube.h.
static unsigned UnitCube::n_vertices | ( | ) | [inline, static] |
Definition at line 26 of file unitcube.h.
void UnitCube::project_2d_points_into_faces | ( | const VecDouble & | pt2D, | |
VecDouble * | ppt3D, | |||
FaceDirection3D | dir | |||
) |
Definition at line 54 of file unitcube.cpp.
ArrayOfVecDouble& UnitCube::vertices | ( | ) | [inline] |
Definition at line 27 of file unitcube.h.
00027 {return _vertices;}
ArrayOfVecDouble UnitCube::_vertices [protected] |
Definition at line 19 of file unitcube.h.
VecDouble UnitCube::e1 [protected] |
Definition at line 18 of file unitcube.h.
VecDouble UnitCube::e2 [protected] |
Definition at line 18 of file unitcube.h.
VecDouble UnitCube::e3 [protected] |
Definition at line 18 of file unitcube.h.