3Depict
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
AnalysisState Class Reference

#include <state.h>

Collaboration diagram for AnalysisState:
Collaboration graph
[legend]

Public Member Functions

 AnalysisState ()
 
 ~AnalysisState ()
 
void clear ()
 
void operator= (const AnalysisState &oth)
 
unsigned int getStateModifyLevel () const
 
void setStateModifyLevel (unsigned int newLevel)
 
bool load (const char *cpFilename, bool merge, std::ostream &errStream)
 
bool save (const char *cpFilename, std::map< std::string, std::string > &fileMapping, bool writePackage, bool setModifyLevel=true)
 
void merge (const AnalysisState &srcState)
 
std::string getFilename () const
 
void setFilename (std::string &s)
 
int getWorldAxisMode () const
 
void getBackgroundColour (float &r, float &g, float &b) const
 
void setBackgroundColour (float r, float g, float b)
 
void setWorldAxisMode (unsigned int mode)
 
void setCamerasByCopy (std::vector< Camera *> &c, unsigned int active)
 
void setCameraByClone (const Camera *c, unsigned int offset)
 
size_t getActiveCam () const
 
void setActiveCam (size_t offset)
 
void removeCam (size_t offset)
 
const CameragetCam (size_t offset) const
 
void copyCams (std::vector< Camera *> &cams) const
 
void copyCamsByRef (std::vector< const Camera *> &cams) const
 
size_t getNumCams () const
 
void addCamByClone (const Camera *c)
 
bool setCamProperty (size_t offset, unsigned int key, const std::string &value)
 
std::string getCamName (size_t offset) const
 
void addCam (const std::string &camName, bool makeActive=false)
 Add a new camera to the scene. More...
 
void setEffectsByCopy (const std::vector< const Effect *> &e)
 
void copyEffects (std::vector< Effect *> &effects) const
 
void setPlotLegend (bool enabled)
 
void setEnabledPlots (const std::vector< std::pair< std::string, unsigned int > > &enabledPlots)
 
void getEnabledPlots (std::vector< std::pair< std::string, unsigned int > > &enabledPlots) const
 
void setUseRelPaths (bool useRel)
 
bool getUseRelPaths () const
 
void setWorkingDir (const std::string &work)
 
std::string getWorkingDir () const
 
void setStashedTreesByClone (const std::vector< std::pair< std::string, FilterTree > > &s)
 Set the stashed filters to use internally. More...
 
void addStashedTree (const std::pair< std::string, FilterTree > &)
 
void stashFilters (unsigned int filterId, const char *stashName)
 Transform the subtree at the given point into a stash, and save it. More...
 
void copyStashedTree (size_t offset, std::pair< std::string, FilterTree > &) const
 
void copyStashedTree (size_t offset, FilterTree &) const
 
void copyStashedTrees (std::vector< std::pair< std::string, FilterTree > > &stashList) const
 
void addStashedToFilters (const Filter *parentFilter, unsigned int stashOffset)
 Insert the given stash into the tree as a child of the given parent filter. More...
 
void eraseStash (size_t offset)
 
void eraseStashes (std::vector< size_t > &offset)
 
size_t getStashCount () const
 
std::string getStashName (size_t offset) const
 
bool hasStateData () const
 
bool hasStateOverrides () const
 Returns true if any of the filters (incl. stash) More...
 
void setAnimationState (const PropertyAnimator &p, const std::vector< std::pair< std::string, size_t > > &animPth)
 
void getAnimationState (PropertyAnimator &p, std::vector< std::pair< std::string, size_t > > &animPth) const
 

Static Public Member Functions

static unsigned int getStateWriterVersion ()
 

Public Attributes

TreeState treeState
 

Constructor & Destructor Documentation

◆ AnalysisState()

AnalysisState::AnalysisState ( )

References STATE_MODIFIED_NONE.

◆ ~AnalysisState()

AnalysisState::~AnalysisState ( )

References clear().

Member Function Documentation

◆ addCam()

void AnalysisState::addCam ( const std::string &  camName,
bool  makeActive = false 
)

◆ addCamByClone()

void AnalysisState::addCamByClone ( const Camera c)

◆ addStashedToFilters()

void AnalysisState::addStashedToFilters ( const Filter parentFilter,
unsigned int  stashOffset 
)

Insert the given stash into the tree as a child of the given parent filter.

References TreeState::addFilterTree(), copyStashedTree(), TreeState::getIdByFilter(), TreeState::pushUndoStack(), and treeState.

◆ addStashedTree()

void AnalysisState::addStashedTree ( const std::pair< std::string, FilterTree > &  )

References setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.

Referenced by TreeState::resetModifyLevel(), and stashFilters().

Here is the caller graph for this function:

◆ clear()

void AnalysisState::clear ( )

◆ copyCams()

void AnalysisState::copyCams ( std::vector< Camera *> &  cams) const

References ASSERT.

◆ copyCamsByRef()

void AnalysisState::copyCamsByRef ( std::vector< const Camera *> &  cams) const

◆ copyEffects()

void AnalysisState::copyEffects ( std::vector< Effect *> &  effects) const

◆ copyStashedTree() [1/2]

void AnalysisState::copyStashedTree ( size_t  offset,
std::pair< std::string, FilterTree > &   
) const

Referenced by addStashedToFilters(), copyStashedTrees(), StashDialog::OnTreeSelChange(), and TreeState::resetModifyLevel().

Here is the caller graph for this function:

◆ copyStashedTree() [2/2]

void AnalysisState::copyStashedTree ( size_t  offset,
FilterTree s 
) const

◆ copyStashedTrees()

void AnalysisState::copyStashedTrees ( std::vector< std::pair< std::string, FilterTree > > &  stashList) const

References copyStashedTree().

◆ eraseStash()

void AnalysisState::eraseStash ( size_t  offset)

References ASSERT, setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.

Referenced by StashDialog::OnListKeyDown().

Here is the caller graph for this function:

◆ eraseStashes()

void AnalysisState::eraseStashes ( std::vector< size_t > &  offset)

References ASSERT, setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.

Referenced by StashDialog::OnBtnRemove().

Here is the caller graph for this function:

◆ getActiveCam()

size_t AnalysisState::getActiveCam ( ) const
inline

References ASSERT.

Referenced by addCam().

Here is the caller graph for this function:

◆ getAnimationState()

void AnalysisState::getAnimationState ( PropertyAnimator p,
std::vector< std::pair< std::string, size_t > > &  animPth 
) const

◆ getBackgroundColour()

void AnalysisState::getBackgroundColour ( float &  r,
float &  g,
float &  b 
) const

◆ getCam()

const Camera * AnalysisState::getCam ( size_t  offset) const

Referenced by addCam().

Here is the caller graph for this function:

◆ getCamName()

std::string AnalysisState::getCamName ( size_t  offset) const

◆ getEnabledPlots()

void AnalysisState::getEnabledPlots ( std::vector< std::pair< std::string, unsigned int > > &  enabledPlots) const
inline

◆ getFilename()

std::string AnalysisState::getFilename ( ) const
inline

◆ getNumCams()

size_t AnalysisState::getNumCams ( ) const
inline

◆ getStashCount()

size_t AnalysisState::getStashCount ( ) const
inline

Referenced by StashDialog::OnTreeSelChange(), and TreeState::resetModifyLevel().

Here is the caller graph for this function:

◆ getStashName()

std::string AnalysisState::getStashName ( size_t  offset) const

References ASSERT.

◆ getStateModifyLevel()

unsigned int AnalysisState::getStateModifyLevel ( ) const

◆ getStateWriterVersion()

unsigned int AnalysisState::getStateWriterVersion ( )
static

Referenced by IonColourFilter::readState().

Here is the caller graph for this function:

◆ getUseRelPaths()

bool AnalysisState::getUseRelPaths ( ) const

◆ getWorkingDir()

std::string AnalysisState::getWorkingDir ( ) const
inline

◆ getWorldAxisMode()

int AnalysisState::getWorldAxisMode ( ) const

◆ hasStateData()

bool AnalysisState::hasStateData ( ) const
inline

◆ hasStateOverrides()

bool AnalysisState::hasStateOverrides ( ) const

Returns true if any of the filters (incl. stash)

References TreeState::hasStateOverrides(), and treeState.

◆ load()

bool AnalysisState::load ( const char *  cpFilename,
bool  merge,
std::ostream &  errStream 
)

Referenced by threeDepictApp::OnCmdLineParsed(), TreeState::resetModifyLevel(), and save().

Here is the caller graph for this function:

◆ merge()

void AnalysisState::merge ( const AnalysisState srcState)

◆ operator=()

void AnalysisState::operator= ( const AnalysisState oth)

References clear(), and treeState.

◆ removeCam()

void AnalysisState::removeCam ( size_t  offset)

◆ save()

bool AnalysisState::save ( const char *  cpFilename,
std::map< std::string, std::string > &  fileMapping,
bool  writePackage,
bool  setModifyLevel = true 
)

◆ setActiveCam()

void AnalysisState::setActiveCam ( size_t  offset)
inline

References ASSERT.

◆ setAnimationState()

void AnalysisState::setAnimationState ( const PropertyAnimator p,
const std::vector< std::pair< std::string, size_t > > &  animPth 
)
inline

◆ setBackgroundColour()

void AnalysisState::setBackgroundColour ( float  r,
float  g,
float  b 
)

References setStateModifyLevel(), and STATE_MODIFIED_VIEW.

Referenced by TreeState::resetModifyLevel().

Here is the caller graph for this function:

◆ setCameraByClone()

void AnalysisState::setCameraByClone ( const Camera c,
unsigned int  offset 
)

◆ setCamerasByCopy()

void AnalysisState::setCamerasByCopy ( std::vector< Camera *> &  c,
unsigned int  active 
)

◆ setCamProperty()

bool AnalysisState::setCamProperty ( size_t  offset,
unsigned int  key,
const std::string &  value 
)

◆ setEffectsByCopy()

void AnalysisState::setEffectsByCopy ( const std::vector< const Effect *> &  e)

◆ setEnabledPlots()

void AnalysisState::setEnabledPlots ( const std::vector< std::pair< std::string, unsigned int > > &  enabledPlots)
inline

◆ setFilename()

void AnalysisState::setFilename ( std::string &  s)
inline

◆ setPlotLegend()

void AnalysisState::setPlotLegend ( bool  enabled)
inline

◆ setStashedTreesByClone()

void AnalysisState::setStashedTreesByClone ( const std::vector< std::pair< std::string, FilterTree > > &  s)

Set the stashed filters to use internally.

References setStateModifyLevel(), and STATE_MODIFIED_ANCILLARY.

◆ setStateModifyLevel()

void AnalysisState::setStateModifyLevel ( unsigned int  newLevel)

◆ setUseRelPaths()

void AnalysisState::setUseRelPaths ( bool  useRel)

◆ setWorkingDir()

void AnalysisState::setWorkingDir ( const std::string &  work)

◆ setWorldAxisMode()

void AnalysisState::setWorldAxisMode ( unsigned int  mode)

References setStateModifyLevel(), and STATE_MODIFIED_VIEW.

Referenced by TreeState::resetModifyLevel().

Here is the caller graph for this function:

◆ stashFilters()

void AnalysisState::stashFilters ( unsigned int  filterId,
const char *  stashName 
)

Transform the subtree at the given point into a stash, and save it.

References addStashedTree(), FilterTree::cloneSubtree(), TreeState::getFilterById(), TreeState::getTreeRef(), and treeState.

Member Data Documentation

◆ treeState

TreeState AnalysisState::treeState

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