Quark Physics
1.0
2D Rigid and Soft Body Physics Engine
|
#include <qmesh.h>
Public Attributes | |
vector< QVector > | particlePositions |
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 |
The data struct of the mesh.
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.
vector<bool> QMesh::MeshData::particleInternalValues |
The collection of boolean values indicating whether a particle is internal.
vector<QVector> QMesh::MeshData::particlePositions |
The collection of local positions of particles.
vector<float> QMesh::MeshData::particleRadValues |
The collection of radius values of particles.
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.
QVector QMesh::MeshData::position =QVector::Zero() |
The position of the mesh
float QMesh::MeshData::rotation =0.0f |
The rotation of the mesh
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.
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.