Quark Physics  1.0
2D Rigid and Soft Body Physics Engine
QMesh::MeshData Struct Reference

#include <qmesh.h>

Collaboration diagram for QMesh::MeshData:

Public Attributes

vector< QVectorparticlePositions
 
vector< float > particleRadValues
 
vector< bool > particleInternalValues
 
vector< pair< int, int > > springList
 
vector< pair< int, int > > internalSpringList
 
vector< int > polygon
 
vector< vector< int > > UVMaps
 
QVector position =QVector::Zero()
 
float rotation =0.0f
 

Detailed Description

The data struct of the mesh.

Member Data Documentation

◆ internalSpringList

vector<pair<int,int> > QMesh::MeshData::internalSpringList

The collection of integer pairs to define internal springs. Internal springs are important for the some mass spring simulation configrations. The integer values define the indices of particles in the particlePositions collection.

◆ particleInternalValues

vector<bool> QMesh::MeshData::particleInternalValues

The collection of boolean values indicating whether a particle is internal.

◆ particlePositions

vector<QVector> QMesh::MeshData::particlePositions

The collection of local positions of particles.

◆ particleRadValues

vector<float> QMesh::MeshData::particleRadValues

The collection of radius values of particles.

◆ polygon

vector<int> QMesh::MeshData::polygon

The polygon collection containing the index collection of the polygons. Polygons are important to define polygon colliders of the mesh. The particle orders should be clockwise. The integer values define the indices of particles in the particlePositions collection.

◆ position

QVector QMesh::MeshData::position =QVector::Zero()

The position of the mesh

◆ rotation

float QMesh::MeshData::rotation =0.0f

The rotation of the mesh

◆ springList

vector<pair<int,int> > QMesh::MeshData::springList

The collection of integer pairs to define springs. The integer values define the indices of particles in the particlePositions collection.

◆ UVMaps

vector<vector<int> > QMesh::MeshData::UVMaps

Contains UV maps. UV polygons can be defined using the index numbers of the particlePositions collection. Each polygon must have at least 3 points. Meshes created with CreateWithRect() or CreateWithPolygon() generate UV maps by subdividing the mesh into triangles.


The documentation for this struct was generated from the following file: