ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
Cloth Class Reference

#include <Cloth.h>

Collaboration diagram for Cloth:
[legend]

Public Member Functions

Particle & getParticle (int x, int y)
 
const Particle & getParticle (int x, int y) const
 
Particle & getParticleByIndex (int index)
 
const Particle getParticleByIndex (int index) const
 
int getSize () const
 
std::vector< double > & getHeightvals ()
 
 Cloth (const Vec3 &origin_pos, int num_particles_width, int num_particles_height, double step_x, double step_y, double smoothThreshold, double heightThreshold, int rigidness, double time_step)
 
void setheightvals (const std::vector< double > &heightvals)
 
double timeStep ()
 
void addForce (const Vec3 &direction)
 
void terrainCollision ()
 
void movableFilter ()
 
void findUnmovablePoint (const std::vector< XY > &connected, const std::vector< double > &heightvals, std::vector< int > &edgePoints)
 
void handle_slop_connected (const std::vector< int > &edgePoints, const std::vector< XY > &connected, const std::vector< std::vector< int >> &neighbors, const std::vector< double > &heightvals)
 
void saveToFile (std::string path="")
 
void saveMovableToFile (std::string path="")
 
ccMesh * toMesh () const
 Converts the cloth to a CC mesh structure. More...
 

Public Attributes

int num_particles_width
 
int num_particles_height
 
Vec3 origin_pos
 
double step_x
 
double step_y
 

Constructor & Destructor Documentation

◆ Cloth()

Cloth::Cloth ( const Vec3 &  origin_pos,
int  num_particles_width,
int  num_particles_height,
double  step_x,
double  step_y,
double  smoothThreshold,
double  heightThreshold,
int  rigidness,
double  time_step 
)

Member Function Documentation

◆ addForce()

void Cloth::addForce ( const Vec3 &  direction)

Referenced by CSF::do_filtering().

◆ findUnmovablePoint()

void Cloth::findUnmovablePoint ( const std::vector< XY > &  connected,
const std::vector< double > &  heightvals,
std::vector< int > &  edgePoints 
)

◆ getHeightvals()

std::vector<double>& Cloth::getHeightvals ( )
inline

Referenced by CSF::do_filtering().

◆ getParticle() [1/2]

◆ getParticle() [2/2]

const Particle& Cloth::getParticle ( int  x,
int  y 
) const
inline

References num_particles_width, x, and y.

◆ getParticleByIndex() [1/2]

Particle& Cloth::getParticleByIndex ( int  index)
inline

◆ getParticleByIndex() [2/2]

const Particle Cloth::getParticleByIndex ( int  index) const
inline

◆ getSize()

int Cloth::getSize ( ) const
inline

◆ handle_slop_connected()

void Cloth::handle_slop_connected ( const std::vector< int > &  edgePoints,
const std::vector< XY > &  connected,
const std::vector< std::vector< int >> &  neighbors,
const std::vector< double > &  heightvals 
)

References num_particles_width.

◆ movableFilter()

void Cloth::movableFilter ( )

◆ saveMovableToFile()

void Cloth::saveMovableToFile ( std::string  path = "")

◆ saveToFile()

void Cloth::saveToFile ( std::string  path = "")

◆ setheightvals()

void Cloth::setheightvals ( const std::vector< double > &  heightvals)
inline

◆ terrainCollision()

void Cloth::terrainCollision ( )

◆ timeStep()

double Cloth::timeStep ( )

This is an important methods where the time is progressed one time step for the entire cloth. This includes calling satisfyConstraint() for every constraint, and calling timeStep() for all particles

issues/909

Referenced by CSF::do_filtering().

◆ toMesh()

Member Data Documentation

◆ num_particles_height

◆ num_particles_width

◆ origin_pos

◆ step_x

double Cloth::step_x

◆ step_y

double Cloth::step_y

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