Vis2 Line Renderer
Linedata-Renderer with transparancy
Dataset Class Reference

This class represents a Line-Dataset. It furthermore offers functionality to load data of an .obj-file and does some preprocessing-steps. More...

#include <Dataset.h>

Public Member Functions

 Dataset ()
 
void importFromFile (std::string filename)
 Load the data of the given ".obj" file into the cpu (mPolyLine-Buffer) and starts some preprocessing work. More...
 
void fillGPUReadyBuffer (std::vector< Vertex > &newVertexBuffer, std::vector< uint32_t > &newIndexBuffer)
 This function fills a vertex-list and an index list. the vertices at in between points of a line get duplicated as proposed in the paper. More...
 
void fillGPUReadyBuffer (std::vector< Vertex > &newVertexBuffer, std::vector< draw_call_t > &newDrawCalls)
 This function fills a vertex-list and a list with information for the draw calls of the different line segments. More...
 
float getLastLoadingTime ()
 Returns the time it took to import the last file in seconds More...
 
float getLastPreprocessTime ()
 Returns the time it took to preprocess the last file in seconds More...
 
int getLineCount ()
 Returns the amount of line individual line segments inside the file More...
 
int getPolylineCount ()
 Returns the amount of connected line segments More...
 
int getVertexCount ()
 Returns the amount of singular vertices in the dataset More...
 
float getMaxLineLength ()
 returns the length of the longest line inside the dataset. More...
 
float getMaxVertexAdjacentLineLength ()
 returns the summed up length of the vertex with the longest adjacend lines. More...
 
bool isFileOpen ()
 returns true if a file was loaded and the polyline buffer is full More...
 
glm::vec3 getDimensions ()
 returns the dimensions of the dataset More...
 
glm::vec2 getDataBounds ()
 returns the min- and maximum More...
 
std::string getName ()
 Returns the filename of the currently loaded dataset More...
 

Detailed Description

This class represents a Line-Dataset. It furthermore offers functionality to load data of an .obj-file and does some preprocessing-steps.

Constructor & Destructor Documentation

◆ Dataset()

Dataset::Dataset ( )

Member Function Documentation

◆ fillGPUReadyBuffer() [1/2]

void Dataset::fillGPUReadyBuffer ( std::vector< Vertex > &  newVertexBuffer,
std::vector< draw_call_t > &  newDrawCalls 
)

This function fills a vertex-list and a list with information for the draw calls of the different line segments.

◆ fillGPUReadyBuffer() [2/2]

void Dataset::fillGPUReadyBuffer ( std::vector< Vertex > &  newVertexBuffer,
std::vector< uint32_t > &  newIndexBuffer 
)

This function fills a vertex-list and an index list. the vertices at in between points of a line get duplicated as proposed in the paper.

◆ getDataBounds()

glm::vec2 Dataset::getDataBounds ( )
inline

returns the min- and maximum

Returns

◆ getDimensions()

glm::vec3 Dataset::getDimensions ( )
inline

returns the dimensions of the dataset

◆ getLastLoadingTime()

float Dataset::getLastLoadingTime ( )
inline

Returns the time it took to import the last file in seconds

◆ getLastPreprocessTime()

float Dataset::getLastPreprocessTime ( )
inline

Returns the time it took to preprocess the last file in seconds

◆ getLineCount()

int Dataset::getLineCount ( )
inline

Returns the amount of line individual line segments inside the file

◆ getMaxLineLength()

float Dataset::getMaxLineLength ( )
inline

returns the length of the longest line inside the dataset.

◆ getMaxVertexAdjacentLineLength()

float Dataset::getMaxVertexAdjacentLineLength ( )
inline

returns the summed up length of the vertex with the longest adjacend lines.

◆ getName()

std::string Dataset::getName ( )
inline

Returns the filename of the currently loaded dataset

◆ getPolylineCount()

int Dataset::getPolylineCount ( )
inline

Returns the amount of connected line segments

◆ getVertexCount()

int Dataset::getVertexCount ( )
inline

Returns the amount of singular vertices in the dataset

◆ importFromFile()

void Dataset::importFromFile ( std::string  filename)

Load the data of the given ".obj" file into the cpu (mPolyLine-Buffer) and starts some preprocessing work.

Parameters
filenameThe full filename to the obj-file

◆ isFileOpen()

bool Dataset::isFileOpen ( )
inline

returns true if a file was loaded and the polyline buffer is full


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