gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
VertexArray Class Reference

#include <VertexArray.h>

Public Member Functions

 VertexArray (int numVerticesPerElement, int numElements)
 
 ~VertexArray ()
 
int getNumVertices ()
 
int getNumVerticesPerElement ()
 
int getNumElementPointers ()
 
float * getVertexArray (int i=0)
 
std::vector< float >::iterator firstVertex ()
 
std::vector< float >::iterator lastVertex ()
 
normal_typegetNormalArray (int i=0)
 
std::vector< normal_type >::iterator firstNormal ()
 
std::vector< normal_type >::iterator lastNormal ()
 
unsigned char * getColorArray (int i=0)
 
std::vector< unsigned char >::iterator firstColor ()
 
std::vector< unsigned char >::iterator lastColor ()
 
MElement ** getElementPointerArray (int i=0)
 
std::vector< MElement * >::iterator firstElementPointer ()
 
std::vector< MElement * >::iterator lastElementPointer ()
 
void add (double *x, double *y, double *z, SVector3 *n, unsigned int *col, MElement *ele=nullptr, bool unique=true, bool boundary=false)
 
void add (double *x, double *y, double *z, SVector3 *n, unsigned char *r=nullptr, unsigned char *g=nullptr, unsigned char *b=nullptr, unsigned char *a=nullptr, MElement *ele=nullptr, bool unique=true, bool boundary=false)
 
void finalize ()
 
void sort (double x, double y, double z)
 
double getMemoryInMb ()
 
char * toChar (int num, const std::string &name, int type, double min, double max, int numsteps, double time, const SBoundingBox3d &bbox, int &len)
 
void fromChar (int length, const char *bytes, int swap)
 
void merge (VertexArray *va)
 

Static Public Member Functions

static int decodeHeader (int length, const char *bytes, int swap, std::string &name, int &tag, int &type, double &min, double &max, int &numSteps, double &time, double &xmin, double &ymin, double &zmin, double &xmax, double &ymax, double &zmax)
 

Private Member Functions

void _addVertex (float x, float y, float z)
 
void _addNormal (float nx, float ny, float nz)
 
void _addColor (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
 
void _addElement (MElement *ele)
 

Private Attributes

int _numVerticesPerElement
 
std::vector< float > _vertices
 
std::vector< normal_type_normals
 
std::vector< unsigned char > _colors
 
std::vector< MElement * > _elements
 
std::set< ElementData< 3 >, ElementDataLessThan< 3 > > _data3
 
std::set< Barycenter, BarycenterLessThan_barycenters
 

Detailed Description

Definition at line 151 of file VertexArray.h.

Constructor & Destructor Documentation

◆ VertexArray()

VertexArray::VertexArray ( int  numVerticesPerElement,
int  numElements 
)

Definition at line 17 of file VertexArray.cpp.

Here is the call graph for this function:

◆ ~VertexArray()

VertexArray::~VertexArray ( )
inline

Definition at line 172 of file VertexArray.h.

Member Function Documentation

◆ _addColor()

void VertexArray::_addColor ( unsigned char  r,
unsigned char  g,
unsigned char  b,
unsigned char  a 
)
private

Definition at line 67 of file VertexArray.cpp.

Referenced by add(), and finalize().

Here is the caller graph for this function:

◆ _addElement()

void VertexArray::_addElement ( MElement ele)
private

Definition at line 76 of file VertexArray.cpp.

Referenced by add(), and finalize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _addNormal()

void VertexArray::_addNormal ( float  nx,
float  ny,
float  nz 
)
private

Definition at line 49 of file VertexArray.cpp.

Referenced by add(), and finalize().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ _addVertex()

void VertexArray::_addVertex ( float  x,
float  y,
float  z 
)
private

Definition at line 42 of file VertexArray.cpp.

Referenced by add(), and finalize().

Here is the caller graph for this function:

◆ add() [1/2]

void VertexArray::add ( double *  x,
double *  y,
double *  z,
SVector3 n,
unsigned char *  r = nullptr,
unsigned char *  g = nullptr,
unsigned char *  b = nullptr,
unsigned char *  a = nullptr,
MElement ele = nullptr,
bool  unique = true,
bool  boundary = false 
)

Definition at line 99 of file VertexArray.cpp.

Here is the call graph for this function:

◆ add() [2/2]

void VertexArray::add ( double *  x,
double *  y,
double *  z,
SVector3 n,
unsigned int *  col,
MElement ele = nullptr,
bool  unique = true,
bool  boundary = false 
)

◆ decodeHeader()

int VertexArray::decodeHeader ( int  length,
const char *  bytes,
int  swap,
std::string &  name,
int &  tag,
int &  type,
double &  min,
double &  max,
int &  numSteps,
double &  time,
double &  xmin,
double &  ymin,
double &  zmin,
double &  xmax,
double &  ymax,
double &  zmax 
)
static

Definition at line 273 of file VertexArray.cpp.

Referenced by PView::fillVertexArray(), and fromChar().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ finalize()

void VertexArray::finalize ( )

Definition at line 138 of file VertexArray.cpp.

Referenced by GFace::fillVertexArray(), initMeshGEdge::operator()(), initMeshGRegion::operator()(), and initPView::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ firstColor()

std::vector<unsigned char>::iterator VertexArray::firstColor ( )
inline

Definition at line 193 of file VertexArray.h.

Referenced by merge().

Here is the caller graph for this function:

◆ firstElementPointer()

std::vector<MElement *>::iterator VertexArray::firstElementPointer ( )
inline

Definition at line 198 of file VertexArray.h.

Referenced by merge().

Here is the caller graph for this function:

◆ firstNormal()

std::vector<normal_type>::iterator VertexArray::firstNormal ( )
inline

Definition at line 188 of file VertexArray.h.

Referenced by merge().

Here is the caller graph for this function:

◆ firstVertex()

std::vector<float>::iterator VertexArray::firstVertex ( )
inline

Definition at line 183 of file VertexArray.h.

Referenced by merge().

Here is the caller graph for this function:

◆ fromChar()

void VertexArray::fromChar ( int  length,
const char *  bytes,
int  swap 
)

Definition at line 313 of file VertexArray.cpp.

Referenced by PView::fillVertexArray().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getColorArray()

unsigned char* VertexArray::getColorArray ( int  i = 0)
inline

Definition at line 192 of file VertexArray.h.

Referenced by drawGFace::_drawVertexArray(), drawArrays(), drawEllipseArray(), drawVectorArray(), and PView::writeX3D().

Here is the caller graph for this function:

◆ getElementPointerArray()

MElement** VertexArray::getElementPointerArray ( int  i = 0)
inline

Definition at line 197 of file VertexArray.h.

Referenced by getElement().

Here is the caller graph for this function:

◆ getMemoryInMb()

double VertexArray::getMemoryInMb ( )

Definition at line 34 of file VertexArray.cpp.

Referenced by PView::getMemoryInMb(), and initPView::operator()().

Here is the caller graph for this function:

◆ getNormalArray()

normal_type* VertexArray::getNormalArray ( int  i = 0)
inline

Definition at line 187 of file VertexArray.h.

Referenced by drawGFace::_drawVertexArray(), and drawArrays().

Here is the caller graph for this function:

◆ getNumElementPointers()

int VertexArray::getNumElementPointers ( )
inline

Definition at line 178 of file VertexArray.h.

Referenced by drawArrays(), and getElement().

Here is the caller graph for this function:

◆ getNumVertices()

int VertexArray::getNumVertices ( )
inline

◆ getNumVerticesPerElement()

int VertexArray::getNumVerticesPerElement ( )
inline

Definition at line 176 of file VertexArray.h.

Referenced by add(), drawArrays(), drawEllipseArray(), drawVectorArray(), and sort().

Here is the caller graph for this function:

◆ getVertexArray()

float* VertexArray::getVertexArray ( int  i = 0)
inline

Definition at line 182 of file VertexArray.h.

Referenced by drawGFace::_drawVertexArray(), drawArrays(), drawEllipseArray(), drawVectorArray(), and PView::writeX3D().

Here is the caller graph for this function:

◆ lastColor()

std::vector<unsigned char>::iterator VertexArray::lastColor ( )
inline

Definition at line 194 of file VertexArray.h.

Referenced by merge().

Here is the caller graph for this function:

◆ lastElementPointer()

std::vector<MElement *>::iterator VertexArray::lastElementPointer ( )
inline

Definition at line 202 of file VertexArray.h.

Referenced by merge().

Here is the caller graph for this function:

◆ lastNormal()

std::vector<normal_type>::iterator VertexArray::lastNormal ( )
inline

Definition at line 189 of file VertexArray.h.

Referenced by merge().

Here is the caller graph for this function:

◆ lastVertex()

std::vector<float>::iterator VertexArray::lastVertex ( )
inline

Definition at line 184 of file VertexArray.h.

Referenced by merge().

Here is the caller graph for this function:

◆ merge()

void VertexArray::merge ( VertexArray va)

Definition at line 343 of file VertexArray.cpp.

Here is the call graph for this function:

◆ sort()

void VertexArray::sort ( double  x,
double  y,
double  z 
)

Definition at line 185 of file VertexArray.cpp.

Referenced by drawPView::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toChar()

char * VertexArray::toChar ( int  num,
const std::string &  name,
int  type,
double  min,
double  max,
int  numsteps,
double  time,
const SBoundingBox3d bbox,
int &  len 
)

Definition at line 234 of file VertexArray.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ _barycenters

std::set<Barycenter, BarycenterLessThan> VertexArray::_barycenters
private

Definition at line 159 of file VertexArray.h.

Referenced by add(), and finalize().

◆ _colors

std::vector<unsigned char> VertexArray::_colors
private

◆ _data3

std::set<ElementData<3>, ElementDataLessThan<3> > VertexArray::_data3
private

Definition at line 158 of file VertexArray.h.

Referenced by add(), and finalize().

◆ _elements

std::vector<MElement *> VertexArray::_elements
private

◆ _normals

std::vector<normal_type> VertexArray::_normals
private

◆ _numVerticesPerElement

int VertexArray::_numVerticesPerElement
private

Definition at line 153 of file VertexArray.h.

Referenced by getNumVerticesPerElement(), and VertexArray().

◆ _vertices

std::vector<float> VertexArray::_vertices
private

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