3D Repo Bouncer  1.4
All Classes Namespaces Functions Variables Enumerations
Public Member Functions | List of all members
repo::manipulator::modelutility::SceneManager Class Reference

Public Member Functions

repo::core::model::RepoScenefetchScene (repo::core::handler::AbstractDatabaseHandler *handler, const std::string &database, const std::string &project, const repoUUID &uuid, const bool &headRevision=true, const bool &lightFetch=false)
 
repo::core::model::RepoScenefetchScene (repo::core::handler::AbstractDatabaseHandler *handler, const std::string &database, const std::string &project)
 
void fetchScene (repo::core::handler::AbstractDatabaseHandler *handler, repo::core::model::RepoScene *scene)
 
bool generateAndCommitSelectionTree (repo::core::model::RepoScene *scene, repo::core::handler::AbstractDatabaseHandler *handler)
 
bool generateStashGraph (repo::core::model::RepoScene *scene, repo::core::handler::AbstractDatabaseHandler *handler=nullptr)
 
bool generateWebViewBuffers (repo::core::model::RepoScene *scene, const repo::manipulator::modelconvertor::WebExportType &exType, repo_web_buffers_t &resultBuffers, repo::core::handler::AbstractDatabaseHandler *handler=nullptr)
 
bool removeStashGraph (repo::core::model::RepoScene *scene, repo::core::handler::AbstractDatabaseHandler *handler=nullptr)
 

Member Function Documentation

repo::core::model::RepoScene * SceneManager::fetchScene ( repo::core::handler::AbstractDatabaseHandler handler,
const std::string &  database,
const std::string &  project,
const repoUUID &  uuid,
const bool &  headRevision = true,
const bool &  lightFetch = false 
)

Retrieve a RepoScene with a specific revision loaded.

Parameters
handlerhander to the database
databasethe database the collection resides in
projectname of the project
uuidif headRevision, uuid represents the branch id, otherwise the unique id of the revision branch
headRevisiontrue if retrieving head revision
lightFetchfetches only the stash (or scene if stash failed), reduce computation and memory usage (ideal for visualisation only)
Returns
returns a pointer to a repoScene.
void SceneManager::fetchScene ( repo::core::handler::AbstractDatabaseHandler handler,
repo::core::model::RepoScene scene 
)

Retrieve all RepoScene representations given a partially loaded scene.

Parameters
handlerdatabase handler
scenescene to fully load
bool SceneManager::generateAndCommitSelectionTree ( repo::core::model::RepoScene scene,
repo::core::handler::AbstractDatabaseHandler handler 
)

Generate and commit scene's selection tree in JSON format The generated data will be also commited to the database/project set within the scene

Parameters
scenescene to optimise
handlerhander to the database
Returns
return true upon success
bool SceneManager::generateStashGraph ( repo::core::model::RepoScene scene,
repo::core::handler::AbstractDatabaseHandler handler = nullptr 
)

Generate a stash graph for the given scene and populate it into the given scene If a databasehandler is given and the scene is revisioned, it will commit the stash to database

Parameters
scenescene to generate stash graph for
handlerhander to the database
Returns
returns true upon success
bool SceneManager::generateWebViewBuffers ( repo::core::model::RepoScene scene,
const repo::manipulator::modelconvertor::WebExportType &  exType,
repo_web_buffers_t resultBuffers,
repo::core::handler::AbstractDatabaseHandler handler = nullptr 
)

Generate a exType encoding for the given scene if a database handler is provided, it will also commit the buffers into the database This requires the repo stash to have been generated already

Parameters
scenethe scene to generate the src encoding from
exTypethe type of export it is
Returns
returns repo_web_buffers upon success
bool SceneManager::removeStashGraph ( repo::core::model::RepoScene scene,
repo::core::handler::AbstractDatabaseHandler handler = nullptr 
)

Remove stash graph entry for the given scene Will also remove it from the database should handler exist

Parameters
scenescene reference to remove stash graph from
handlerhander to the database
Returns
returns true upon success

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