VStreamLine Class Reference

#include <VStreamLine.h>

List of all members.

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 ()
VStreamLineoperator= (const VStreamLine &rhs)
void draw (bool tap, float scale, bool glyph)
int getNumberOfPoints ()
void setSeparation (float dsep, float dtest)
std::vector< VVectorgetCandidateSeeds (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< VVectormPositions
std::vector< int > mIndices
unsigned int mPositionVBOHandle
unsigned int mIndexVBOHandle
std::vector< float > mTaperFactors
std::vector< VVectormTaperVectors
unsigned int mTaperVBOHandle
float m_Separation_dsep
float m_Separation_dtest


Detailed Description

class representing a Single StreamLine

Definition at line 11 of file VStreamLine.h.


Constructor & Destructor Documentation

VStreamLine::VStreamLine (  ) 

default Constructor

Definition at line 4 of file VStreamLine.cpp.

VStreamLine::VStreamLine ( std::vector< VVector m_Positions  ) 

constructor with given Positions

Parameters:
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

Parameters:
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

Parameters:
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.


Member Function Documentation

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

Parameters:
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

Returns:
number of points

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

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

Parameters:
dsep is dsep
Returns:
vector of candidate seeds

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

Parameters:
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

Parameters:
m_Point possible New Point
m_Epsilon minimum distance
Returns:
return true, if Point is allowed

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

Parameters:
m_Point is the point to get the minimal distance
Returns:
the minmal distance

Definition at line 352 of file VStreamLine.cpp.

References mPositions.

void VStreamLine::setThicknessCoefficient ( std::vector< float >  thickness  )  [inline]

sets the thickness coefficients

Parameters:
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

Parameters:
m_Point possible New Point
m_Epsilon minimum distance
m_Distance Pointer to memory where distance is stored for further use
Returns:
return true, if Point is allowed

Definition at line 443 of file VStreamLine.cpp.

References mPositions.

bool VStreamLine::interSectsStreamLine ( VVector  m_Point1,
VVector  m_Point2 
)

checks if a line intersects the streamline

Parameters:
m_Point1 first point of Line
m_Point2 second point of Line
Returns:
true if the line intersects the streamline

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

Parameters:
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

Parameters:
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]

deactivates the VBO

Definition at line 600 of file VStreamLine.cpp.

Referenced by draw().


Member Data Documentation

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]

Definition at line 241 of file VStreamLine.h.

Referenced by setSeparation().

float VStreamLine::m_Separation_dtest [private]

Definition at line 242 of file VStreamLine.h.

Referenced by setSeparation().


The documentation for this class was generated from the following files:
Generated on Mon Jan 21 01:15:17 2008 for FlowVis by  doxygen 1.5.4