Atoms Crowd  7.0.0
Atoms::AtomsClothCaches Class Reference

Public Member Functions

bool openCache (const std::string &cachePath, const std::string &cacheName)
 
bool openCache (const std::string &cachePath, const std::string &cacheName, const std::vector< int > &agents)
 
void loadTime (double time)
 Loads the pre/next and current frame given the input time.
 
void loadPrevFrame (int frame)
 Loads a cache frame and store in the previous frame (usually used for the previous frame during the motion blur computation)
 
void loadFrame (int frame)
 Loads a cache frame and stores the current frame data. More...
 
void loadNextFrame (int frame)
 Loads a cache frame and stores the next frame data (usually used for the next frame during the motion blur computation)
 
int startFrame () const
 Get the start frame.
 
int endFrame () const
 Get the end frame.
 
int currentFrame () const
 Get the current frame.
 
int prevFrame () const
 Get the previous frame.
 
int nextFrame () const
 Get the next frame.
 
void loadBoundingBox (double time, AtomsCore::Box3 &box) const
 Loads bbox. More...
 
void loadAgentClothBoundingBox (double time, unsigned int agentId, AtomsCore::Box3 &box) const
 Loads an agent bbox. More...
 
void loadAgentClothMeshBoundingBox (double time, unsigned int agentId, const std::string &meshName, AtomsCore::Box3 &box) const
 Loads an agent bbox. More...
 
void loadAgentClothMesh (double time, unsigned int agentId, const std::string &meshName, std::vector< AtomsCore::Vector3 > &points, std::vector< AtomsCore::Vector3 > &normals) const
 Loads all data for an agent. More...
 
std::string getAgentClothMeshStackOrder (double time, unsigned int agentId, const std::string &meshName) const
 Get cloth mesh stack order. More...
 
bool hasAgentClothMesh (double time, unsigned int agentId, const std::string &meshName) const
 Check if a mesh for an egent exist inside the cache. More...
 
void clear ()
 Clear all the loaded frames.
 
std::vector< int > agentIds (double time) const
 Gets agent ids.
 
std::vector< std::string > agentClothMeshNames (double time, unsigned int agentId) const
 Gets agent cloth mesh names.
 
void setAgentsToLoad (const std::vector< int > &agents)
 
void removeAllCaches ()
 
void removeCache (const std::string &cachePath, const std::string &cacheName)
 
std::vector< std::pair< std::string, std::string > > getCachePaths () const
 

Member Function Documentation

◆ getAgentClothMeshStackOrder()

std::string Atoms::AtomsClothCaches::getAgentClothMeshStackOrder ( double  time,
unsigned int  agentId,
const std::string &  meshName 
) const

Get cloth mesh stack order.

It returns "first" or "last" or an empty string if there is no data

Parameters
timeCache frame, this is must always be a value between the prev, current and next frame. You should load the correct frames before calling this function
agentIdCache agent id
meshNameMesh name

◆ hasAgentClothMesh()

bool Atoms::AtomsClothCaches::hasAgentClothMesh ( double  time,
unsigned int  agentId,
const std::string &  meshName 
) const

Check if a mesh for an egent exist inside the cache.

Parameters
timeCache frame, this is must always be a value between the prev, current and next frame. You should load the correct frames before calling this function
agentIdCache agent id
meshNameMesh name

◆ loadAgentClothBoundingBox()

void Atoms::AtomsClothCaches::loadAgentClothBoundingBox ( double  time,
unsigned int  agentId,
AtomsCore::Box3 box 
) const

Loads an agent bbox.

Parameters
timeCache frame, this is must always be a value between the prev, current and next frame. You should load the correct frames before calling this function
agentIdCache agent id
boxBBox loaded

◆ loadAgentClothMesh()

void Atoms::AtomsClothCaches::loadAgentClothMesh ( double  time,
unsigned int  agentId,
const std::string &  meshName,
std::vector< AtomsCore::Vector3 > &  points,
std::vector< AtomsCore::Vector3 > &  normals 
) const

Loads all data for an agent.

Parameters
timeCache frame, this is must always be a value between the prev, current and next frame. You should load the correct frames before calling this function
agentIdCache agent id
meshNameMesh name
pointsOut mesh points
normalsOut mesh normals

◆ loadAgentClothMeshBoundingBox()

void Atoms::AtomsClothCaches::loadAgentClothMeshBoundingBox ( double  time,
unsigned int  agentId,
const std::string &  meshName,
AtomsCore::Box3 box 
) const

Loads an agent bbox.

Parameters
timeCache frame, this is must always be a value between the prev, current and next frame. You should load the correct frames before calling this function
agentIdCache agent id
meshNameMesh name
boxBBox loaded

◆ loadBoundingBox()

void Atoms::AtomsClothCaches::loadBoundingBox ( double  time,
AtomsCore::Box3 box 
) const

Loads bbox.

Parameters
timeCache frame, this is must always be a value between the prev, current and next frame. You should load the correct frames before calling this function
boxBBox loaded

◆ loadFrame()

void Atoms::AtomsClothCaches::loadFrame ( int  frame)

Loads a cache frame and stores the current frame data.

If a frame was already loaded then the old frame data is moved to the previous frame slot


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