#include <VStreamLine.h>
Public Member Functions | |
| VStreamLine () | |
| VStreamLine (std::vector< VVector > m_Positions) | |
| VStreamLine (std::vector< VVector > m_Positions, std::vector< float > m_TaperFactors) | |
| VStreamLine (const VStreamLine &rhs) | |
| ~VStreamLine () | |
| VStreamLine & | operator= (const VStreamLine &rhs) |
| void | draw (bool tap, float scale, bool glyph) |
| int | getNumberOfPoints () |
| void | setSeparation (float dsep, float dtest) |
| std::vector< VVector > | getCandidateSeeds (float dsep) |
| void | computeThicknessCoefficients (float dtest, float dsep, std::vector< VStreamLine > others, int itself, float datasizemax) |
| void | clearVBO () |
| bool | isPointAllowed (VVector m_Point, float m_Epsilon) |
| float | getMinimalDistance (VVector m_Point) |
| void | setThicknessCoefficient (std::vector< float > thickness) |
| bool | isPointAllowed (VVector m_Point, float m_Epsilon, float *m_Distance) |
| bool | interSectsStreamLine (VVector m_Point1, VVector m_Point2) |
| void | regenerateVBO () |
| void | loadStreamLine (FILE *m_FilePointer) |
| void | saveStreamLine (FILE *m_FilePointer) |
Private Member Functions | |
| void | generateVBO () |
| void | activateVBO () |
| void | deactivateVBO () |
Private Attributes | |
| std::vector< VVector > | mPositions |
| std::vector< int > | mIndices |
| unsigned int | mPositionVBOHandle |
| unsigned int | mIndexVBOHandle |
| std::vector< float > | mTaperFactors |
| std::vector< VVector > | mTaperVectors |
| unsigned int | mTaperVBOHandle |
| float | m_Separation_dsep |
| float | m_Separation_dtest |
Definition at line 11 of file VStreamLine.h.
| VStreamLine::VStreamLine | ( | ) |
default Constructor
Definition at line 4 of file VStreamLine.cpp.
| VStreamLine::VStreamLine | ( | std::vector< VVector > | m_Positions | ) |
constructor with given Positions
| m_Positions | Positions of StreamLine |
Definition at line 9 of file VStreamLine.cpp.
References mIndices, mPositions, mTaperFactors, and mTaperVectors.
| VStreamLine::VStreamLine | ( | std::vector< VVector > | m_Positions, | |
| std::vector< float > | m_TaperFactors | |||
| ) |
constructor with given Positions
| m_Positions | Positions of StreamLine | |
| m_TaperFactors | Factors for Tapering the StreamLine |
Definition at line 24 of file VStreamLine.cpp.
References mIndices, mPositions, and mTaperFactors.
| VStreamLine::VStreamLine | ( | const VStreamLine & | rhs | ) | [inline] |
copy constructor
| rhs | New Streamline |
Definition at line 37 of file VStreamLine.h.
References clearVBO(), mIndexVBOHandle, mIndices, mPositions, mPositionVBOHandle, mTaperFactors, and mTaperVectors.
| VStreamLine::~VStreamLine | ( | ) | [inline] |
default Destructor
Definition at line 63 of file VStreamLine.h.
References clearVBO(), mIndices, mPositions, mTaperFactors, and mTaperVectors.
| VStreamLine& VStreamLine::operator= | ( | const VStreamLine & | rhs | ) | [inline] |
assignment operator
Definition at line 77 of file VStreamLine.h.
References clearVBO(), mIndexVBOHandle, mIndices, mPositions, mPositionVBOHandle, mTaperFactors, and mTaperVectors.
| void VStreamLine::draw | ( | bool | tap, | |
| float | scale, | |||
| bool | glyph | |||
| ) |
draws the StreamLine
| tap | is the state of tapering | |
| scale | the scale of tapering | |
| glyph | if glyph should be used |
Definition at line 40 of file VStreamLine.cpp.
References activateVBO(), deactivateVBO(), VVector::getPtr(), VVector::getX(), VVector::getY(), mIndices, mPositions, mTaperFactors, and mTaperVectors.
Referenced by VFlowData::drawStreamLines().
| int VStreamLine::getNumberOfPoints | ( | ) | [inline] |
gets the number of poitns constituing this streamline
Definition at line 113 of file VStreamLine.h.
References mPositions.
Referenced by VFlowData::generateCPUStreamLinesEVEN(), and getCandidateSeeds().
| void VStreamLine::setSeparation | ( | float | dsep, | |
| float | dtest | |||
| ) | [inline] |
sets the separation parameters
| dsep | is dsep | |
| dtest | is dtest |
Definition at line 124 of file VStreamLine.h.
References m_Separation_dsep, and m_Separation_dtest.
Referenced by VFlowData::generateCPUStreamLinesEVEN().
| std::vector< VVector > VStreamLine::getCandidateSeeds | ( | float | dsep | ) |
get the candidate seeds
| dsep | is dsep |
Definition at line 230 of file VStreamLine.cpp.
References getNumberOfPoints(), VVector::getX(), VVector::getY(), mPositions, and VVector::normalize().
Referenced by VFlowData::generateCPUStreamLinesEVEN().
| void VStreamLine::computeThicknessCoefficients | ( | float | dtest, | |
| float | dsep, | |||
| std::vector< VStreamLine > | others, | |||
| int | itself, | |||
| float | datasizemax | |||
| ) |
computes the thickness coefficients for tapering for the streamline and saves them in a vector
| dsep | is dsep | |
| dtest | is dtest |
Definition at line 305 of file VStreamLine.cpp.
References VVector::getX(), VVector::getY(), mPositions, mTaperFactors, mTaperVectors, and VVector::normalize().
Referenced by VFlowData::generateCPUStreamLinesEVEN().
| void VStreamLine::clearVBO | ( | ) |
clears the VBO data
Definition at line 211 of file VStreamLine.cpp.
References mIndexVBOHandle, mPositionVBOHandle, and mTaperVBOHandle.
Referenced by loadStreamLine(), VFlowData::loadStreamLines(), operator=(), VStreamLine(), and ~VStreamLine().
| bool VStreamLine::isPointAllowed | ( | VVector | m_Point, | |
| float | m_Epsilon | |||
| ) |
checks if a new Point is allowed. checks the nearest edgepoint of streamline and the 2 lines connected to the nearest edgepoint for the distance to the given epsilon
| m_Point | possible New Point | |
| m_Epsilon | minimum distance |
Definition at line 380 of file VStreamLine.cpp.
References mPositions.
| float VStreamLine::getMinimalDistance | ( | VVector | m_Point | ) |
gets the minimal distance for a given point from this streamline
| m_Point | is the point to get the minimal distance |
Definition at line 352 of file VStreamLine.cpp.
References mPositions.
| void VStreamLine::setThicknessCoefficient | ( | std::vector< float > | thickness | ) | [inline] |
sets the thickness coefficients
| thickness | are the coefficients |
Definition at line 172 of file VStreamLine.h.
References mTaperFactors.
| bool VStreamLine::isPointAllowed | ( | VVector | m_Point, | |
| float | m_Epsilon, | |||
| float * | m_Distance | |||
| ) |
checks if a new Point is allowed. checks the nearest edgepoint of streamline and the 2 lines connected to the nearest edgepoint for the distance to the given epsilon
| m_Point | possible New Point | |
| m_Epsilon | minimum distance | |
| m_Distance | Pointer to memory where distance is stored for further use |
Definition at line 443 of file VStreamLine.cpp.
References mPositions.
checks if a line intersects the streamline
| m_Point1 | first point of Line | |
| m_Point2 | second point of Line |
Definition at line 476 of file VStreamLine.cpp.
References VVector::getX(), VVector::getY(), and mPositions.
| void VStreamLine::regenerateVBO | ( | ) | [inline] |
Definition at line 197 of file VStreamLine.h.
References generateVBO().
Referenced by VFlowData::drawStreamlinesFromSeedpoints(), VFlowData::generateCPUStreamLinesALL(), VFlowData::generateCPUStreamLinesALL_RK2(), VFlowData::generateCPUStreamLinesBOTTOM(), VFlowData::generateCPUStreamLinesBOTTOM_RK2(), VFlowData::generateCPUStreamLinesEVEN(), VFlowData::generateCPUStreamLinesLEFT(), VFlowData::generateCPUStreamLinesLEFT_RK2(), VFlowData::generateCPUStreamLinesRANDOM(), VFlowData::generateCPUStreamLinesRANDOM_RK2(), VFlowData::generateCPUStreamLinesRIGHT(), VFlowData::generateCPUStreamLinesRIGHT_RK2(), VFlowData::generateCPUStreamLinesTOP(), and VFlowData::generateCPUStreamLinesTOP_RK2().
| void VStreamLine::loadStreamLine | ( | FILE * | m_FilePointer | ) |
loads a Single StreamLine out of the given FILE
| m_FilePointer | to File at position of next streamline |
Definition at line 511 of file VStreamLine.cpp.
References clearVBO(), generateVBO(), mIndices, mPositions, mTaperFactors, and mTaperVectors.
Referenced by VFlowData::loadStreamLines().
| void VStreamLine::saveStreamLine | ( | FILE * | m_FilePointer | ) |
saves a Single StreamLine out into the given FILE
| m_FilePointer | to File at position of next streamline |
Definition at line 544 of file VStreamLine.cpp.
References mPositions, mTaperFactors, and mTaperVectors.
Referenced by VFlowData::saveStreamLines().
| void VStreamLine::generateVBO | ( | ) | [private] |
generates the VBO
Definition at line 565 of file VStreamLine.cpp.
References mIndexVBOHandle, mIndices, mPositions, mPositionVBOHandle, mTaperVBOHandle, and mTaperVectors.
Referenced by loadStreamLine(), and regenerateVBO().
| void VStreamLine::activateVBO | ( | ) | [private] |
activates the VBO
Definition at line 583 of file VStreamLine.cpp.
References mIndexVBOHandle, mPositionVBOHandle, and mTaperVBOHandle.
Referenced by draw().
| void VStreamLine::deactivateVBO | ( | ) | [private] |
std::vector<VVector> VStreamLine::mPositions [private] |
Positions of the StreamLine.
Definition at line 232 of file VStreamLine.h.
Referenced by computeThicknessCoefficients(), draw(), generateVBO(), getCandidateSeeds(), getMinimalDistance(), getNumberOfPoints(), interSectsStreamLine(), isPointAllowed(), loadStreamLine(), operator=(), saveStreamLine(), VStreamLine(), and ~VStreamLine().
std::vector<int> VStreamLine::mIndices [private] |
Indices of the StreamLine.
Definition at line 233 of file VStreamLine.h.
Referenced by draw(), generateVBO(), loadStreamLine(), operator=(), VStreamLine(), and ~VStreamLine().
unsigned int VStreamLine::mPositionVBOHandle [private] |
Handle for the Position VBO.
Definition at line 235 of file VStreamLine.h.
Referenced by activateVBO(), clearVBO(), generateVBO(), operator=(), and VStreamLine().
unsigned int VStreamLine::mIndexVBOHandle [private] |
Handle for the Index VBO.
Definition at line 236 of file VStreamLine.h.
Referenced by activateVBO(), clearVBO(), generateVBO(), operator=(), and VStreamLine().
std::vector<float> VStreamLine::mTaperFactors [private] |
Factors for tapering the Line.
Definition at line 237 of file VStreamLine.h.
Referenced by computeThicknessCoefficients(), draw(), loadStreamLine(), operator=(), saveStreamLine(), setThicknessCoefficient(), VStreamLine(), and ~VStreamLine().
std::vector<VVector> VStreamLine::mTaperVectors [private] |
Factors for tapering the Line.
Definition at line 238 of file VStreamLine.h.
Referenced by computeThicknessCoefficients(), draw(), generateVBO(), loadStreamLine(), operator=(), saveStreamLine(), VStreamLine(), and ~VStreamLine().
unsigned int VStreamLine::mTaperVBOHandle [private] |
Handle for the Taper VBO.
Definition at line 239 of file VStreamLine.h.
Referenced by activateVBO(), clearVBO(), and generateVBO().
float VStreamLine::m_Separation_dsep [private] |
float VStreamLine::m_Separation_dtest [private] |
1.5.4