Atoms Crowd
7.0.0
|
Public Member Functions | |
AtomsClothCache () | |
Constructor. | |
AtomsClothCache (const std::string &cachePath, const std::string &cacheName) | |
Constructor. | |
AtomsClothCache (const std::string &cachePath, const std::string &cacheName, const std::vector< int > &agents) | |
Constructor. | |
~AtomsClothCache () | |
Destructor. | |
bool | openCache (const std::string &cachePath, const std::string &cacheName) |
Opens a cache. More... | |
bool | openCache (const std::string &cachePath, const std::string &cacheName, const std::vector< int > &agents) |
Opens a cache. More... | |
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. | |
AtomsPtr< AtomsCore::MapMetadata > & | prevFrameData () |
Get the previous frame data. | |
AtomsPtr< AtomsCore::MapMetadata > & | frameData () |
Get the current frame data. | |
AtomsPtr< AtomsCore::MapMetadata > & | nextFrameData () |
Get the next frame data. | |
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. | |
size_t | numAgents (double time) const |
Gets the number of agents created. | |
void | setAgentsToLoad (const std::vector< int > &agents) |
const std::string & | cacheName () const |
const std::string & | cachePath () const |
Static Public Member Functions | |
static void | processPoints (std::vector< AtomsCore::Vector3 > &outPoints, std::vector< const std::vector< AtomsCore::Vector3 > * > &inPoints, const std::vector< double > &inputWeightVector) |
Blends multiple mapmetadata. | |
static void | processNormals (std::vector< AtomsCore::Vector3 > &outNormals, std::vector< const std::vector< AtomsCore::Vector3 > * > &inNormals, const std::vector< double > &inputWeightVector) |
std::string Atoms::AtomsClothCache::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
time | Cache 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 |
agentId | Cache agent id |
meshName | Mesh name |
bool Atoms::AtomsClothCache::hasAgentClothMesh | ( | double | time, |
unsigned int | agentId, | ||
const std::string & | meshName | ||
) | const |
Check if a mesh for an egent exist inside the cache.
time | Cache 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 |
agentId | Cache agent id |
meshName | Mesh name |
void Atoms::AtomsClothCache::loadAgentClothBoundingBox | ( | double | time, |
unsigned int | agentId, | ||
AtomsCore::Box3 & | box | ||
) | const |
Loads an agent bbox.
time | Cache 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 |
agentId | Cache agent id |
box | BBox loaded |
void Atoms::AtomsClothCache::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.
time | Cache 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 |
agentId | Cache agent id |
meshName | Mesh name |
points | Out mesh points |
normals | Out mesh normals |
void Atoms::AtomsClothCache::loadAgentClothMeshBoundingBox | ( | double | time, |
unsigned int | agentId, | ||
const std::string & | meshName, | ||
AtomsCore::Box3 & | box | ||
) | const |
Loads an agent bbox.
time | Cache 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 |
agentId | Cache agent id |
meshName | Mesh name |
box | BBox loaded |
void Atoms::AtomsClothCache::loadBoundingBox | ( | double | time, |
AtomsCore::Box3 & | box | ||
) | const |
Loads bbox.
time | Cache 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 |
box | BBox loaded |
void Atoms::AtomsClothCache::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
bool Atoms::AtomsClothCache::openCache | ( | const std::string & | cachePath, |
const std::string & | cacheName | ||
) |
Opens a cache.
Only the header is loaded
bool Atoms::AtomsClothCache::openCache | ( | const std::string & | cachePath, |
const std::string & | cacheName, | ||
const std::vector< int > & | agents | ||
) |
Opens a cache.
Only the header is loaded
agents | Agents ids, it loads only those agents from the cache |