SOFA API  df6198ac
Open source framework for multi-physics simuation
sofa::core::visual::DisplayFlags Class Reference

#include <DisplayFlags.h>

Class which describes the display of components in a hierarchical fashion DisplayFlags are conveyed by the VisualParams, and therefore are accessible in a read only fashion inside a Component draw method. A component can tell if it should draw something on the display by looking at the current state of the displayFlags through the VisualParams parameter. DisplayFlags are embeddable inside a Data and can therefore read/write their state from a stream. More...

Detailed Description

Class which describes the display of components in a hierarchical fashion DisplayFlags are conveyed by the VisualParams, and therefore are accessible in a read only fashion inside a Component draw method. A component can tell if it should draw something on the display by looking at the current state of the displayFlags through the VisualParams parameter. DisplayFlags are embeddable inside a Data and can therefore read/write their state from a stream.

root |–all | |–visual | | |–visualmodels | |–behavior | | |–behaviormodels | | |–forcefields | | |–interactionforcefields | |–collision | | |–collisionmodels | | |–boundingcollisionmodels | |–mapping | | |–visualmappings | | |–mechanicalmappings |–options | |–advancedrendering | |–wireframe | |–normals

Protected Attributes

FlagTreeItem m_root
 
FlagTreeItem m_showAll
 
FlagTreeItem m_showVisual
 
FlagTreeItem m_showVisualModels
 
FlagTreeItem m_showBehavior
 
FlagTreeItem m_showBehaviorModels
 
FlagTreeItem m_showForceFields
 
FlagTreeItem m_showInteractionForceFields
 
FlagTreeItem m_showCollision
 
FlagTreeItem m_showCollisionModels
 
FlagTreeItem m_showBoundingCollisionModels
 
FlagTreeItem m_showDetectionOutputs
 
FlagTreeItem m_showMapping
 
FlagTreeItem m_showVisualMappings
 
FlagTreeItem m_showMechanicalMappings
 
FlagTreeItem m_showOptions
 
FlagTreeItem m_showAdvancedRendering
 
FlagTreeItem m_showWireframe
 
FlagTreeItem m_showNormals
 

Public Member Functions

 DisplayFlags ()
 
 DisplayFlags (const DisplayFlags &)
 
DisplayFlagsoperator= (const DisplayFlags &)
 
tristate getShowAll () const
 
tristate getShowVisual () const
 
tristate getShowVisualModels () const
 
tristate getShowBehavior () const
 
tristate getShowBehaviorModels () const
 
tristate getShowForceFields () const
 
tristate getShowInteractionForceFields () const
 
tristate getShowCollision () const
 
tristate getShowCollisionModels () const
 
tristate getShowBoundingCollisionModels () const
 
tristate getShowDetectionOutputs () const
 
tristate getShowMapping () const
 
tristate getShowMappings () const
 
tristate getShowMechanicalMappings () const
 
tristate getShowOptions () const
 
tristate getShowAdvancedRendering () const
 
tristate getShowWireFrame () const
 
tristate getShowNormals () const
 
DisplayFlagssetShowAll (tristate v=true)
 
DisplayFlagssetShowVisual (tristate v=true)
 
DisplayFlagssetShowVisualModels (tristate v=true)
 
DisplayFlagssetShowBehavior (tristate v=true)
 
DisplayFlagssetShowBehaviorModels (tristate v=true)
 
DisplayFlagssetShowForceFields (tristate v=true)
 
DisplayFlagssetShowInteractionForceFields (tristate v=true)
 
DisplayFlagssetShowCollision (tristate v=true)
 
DisplayFlagssetShowCollisionModels (tristate v=true)
 
DisplayFlagssetShowBoundingCollisionModels (tristate v=true)
 
DisplayFlagssetShowDetectionOutputs (tristate v=true)
 
DisplayFlagssetShowMapping (tristate v=true)
 
DisplayFlagssetShowMappings (tristate v=true)
 
DisplayFlagssetShowMechanicalMappings (tristate v=true)
 
DisplayFlagssetShowOptions (tristate v=true)
 
DisplayFlagssetShowAdvancedRendering (tristate v=true)
 
DisplayFlagssetShowWireFrame (tristate v=true)
 
DisplayFlagssetShowNormals (tristate v=true)
 
std::istream & read (std::istream &in, const std::function< void(std::string)> &unknownFlagFunction, const std::function< void(std::string, std::string)> &incorrectLetterCaseFunction)
 
bool isNeutral () const
 
sofa::type::vector< std::string > getAllFlagsLabels () const
 

Friends

SOFA_CORE_API friend std::ostream & operator<< (std::ostream &os, const DisplayFlags &flags)
 
SOFA_CORE_API friend std::istream & operator>> (std::istream &in, DisplayFlags &flags)
 
SOFA_CORE_API DisplayFlags merge_displayFlags (const DisplayFlags &previous, const DisplayFlags &current)
 
SOFA_CORE_API DisplayFlags difference_displayFlags (const DisplayFlags &parent, const DisplayFlags &child)
 

Attribute details

◆ m_root

FlagTreeItem sofa::core::visual::DisplayFlags::m_root
protected

◆ m_showAdvancedRendering

FlagTreeItem sofa::core::visual::DisplayFlags::m_showAdvancedRendering
protected

◆ m_showAll

FlagTreeItem sofa::core::visual::DisplayFlags::m_showAll
protected

◆ m_showBehavior

FlagTreeItem sofa::core::visual::DisplayFlags::m_showBehavior
protected

◆ m_showBehaviorModels

FlagTreeItem sofa::core::visual::DisplayFlags::m_showBehaviorModels
protected

◆ m_showBoundingCollisionModels

FlagTreeItem sofa::core::visual::DisplayFlags::m_showBoundingCollisionModels
protected

◆ m_showCollision

FlagTreeItem sofa::core::visual::DisplayFlags::m_showCollision
protected

◆ m_showCollisionModels

FlagTreeItem sofa::core::visual::DisplayFlags::m_showCollisionModels
protected

◆ m_showDetectionOutputs

FlagTreeItem sofa::core::visual::DisplayFlags::m_showDetectionOutputs
protected

◆ m_showForceFields

FlagTreeItem sofa::core::visual::DisplayFlags::m_showForceFields
protected

◆ m_showInteractionForceFields

FlagTreeItem sofa::core::visual::DisplayFlags::m_showInteractionForceFields
protected

◆ m_showMapping

FlagTreeItem sofa::core::visual::DisplayFlags::m_showMapping
protected

◆ m_showMechanicalMappings

FlagTreeItem sofa::core::visual::DisplayFlags::m_showMechanicalMappings
protected

◆ m_showNormals

FlagTreeItem sofa::core::visual::DisplayFlags::m_showNormals
protected

◆ m_showOptions

FlagTreeItem sofa::core::visual::DisplayFlags::m_showOptions
protected

◆ m_showVisual

FlagTreeItem sofa::core::visual::DisplayFlags::m_showVisual
protected

◆ m_showVisualMappings

FlagTreeItem sofa::core::visual::DisplayFlags::m_showVisualMappings
protected

◆ m_showVisualModels

FlagTreeItem sofa::core::visual::DisplayFlags::m_showVisualModels
protected

◆ m_showWireframe

FlagTreeItem sofa::core::visual::DisplayFlags::m_showWireframe
protected

Constructor details

◆ DisplayFlags() [1/2]

sofa::core::visual::DisplayFlags::DisplayFlags ( )

◆ DisplayFlags() [2/2]

sofa::core::visual::DisplayFlags::DisplayFlags ( const DisplayFlags other)

Function details

◆ getAllFlagsLabels()

sofa::type::vector< std::string > sofa::core::visual::DisplayFlags::getAllFlagsLabels ( ) const

◆ getShowAdvancedRendering()

tristate sofa::core::visual::DisplayFlags::getShowAdvancedRendering ( ) const
inline

◆ getShowAll()

tristate sofa::core::visual::DisplayFlags::getShowAll ( ) const
inline

◆ getShowBehavior()

tristate sofa::core::visual::DisplayFlags::getShowBehavior ( ) const
inline

◆ getShowBehaviorModels()

tristate sofa::core::visual::DisplayFlags::getShowBehaviorModels ( ) const
inline

◆ getShowBoundingCollisionModels()

tristate sofa::core::visual::DisplayFlags::getShowBoundingCollisionModels ( ) const
inline

◆ getShowCollision()

tristate sofa::core::visual::DisplayFlags::getShowCollision ( ) const
inline

◆ getShowCollisionModels()

tristate sofa::core::visual::DisplayFlags::getShowCollisionModels ( ) const
inline

◆ getShowDetectionOutputs()

tristate sofa::core::visual::DisplayFlags::getShowDetectionOutputs ( ) const
inline

◆ getShowForceFields()

tristate sofa::core::visual::DisplayFlags::getShowForceFields ( ) const
inline

◆ getShowInteractionForceFields()

tristate sofa::core::visual::DisplayFlags::getShowInteractionForceFields ( ) const
inline

◆ getShowMapping()

tristate sofa::core::visual::DisplayFlags::getShowMapping ( ) const
inline

◆ getShowMappings()

tristate sofa::core::visual::DisplayFlags::getShowMappings ( ) const
inline

◆ getShowMechanicalMappings()

tristate sofa::core::visual::DisplayFlags::getShowMechanicalMappings ( ) const
inline

◆ getShowNormals()

tristate sofa::core::visual::DisplayFlags::getShowNormals ( ) const
inline

◆ getShowOptions()

tristate sofa::core::visual::DisplayFlags::getShowOptions ( ) const
inline

◆ getShowVisual()

tristate sofa::core::visual::DisplayFlags::getShowVisual ( ) const
inline

◆ getShowVisualModels()

tristate sofa::core::visual::DisplayFlags::getShowVisualModels ( ) const
inline

◆ getShowWireFrame()

tristate sofa::core::visual::DisplayFlags::getShowWireFrame ( ) const
inline

◆ isNeutral()

bool sofa::core::visual::DisplayFlags::isNeutral ( ) const

◆ operator=()

DisplayFlags & sofa::core::visual::DisplayFlags::operator= ( const DisplayFlags other)

◆ read()

std::istream & sofa::core::visual::DisplayFlags::read ( std::istream &  in,
const std::function< void(std::string)> &  unknownFlagFunction,
const std::function< void(std::string, std::string)> &  incorrectLetterCaseFunction 
)

◆ setShowAdvancedRendering()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowAdvancedRendering ( tristate  v = true)
inline

◆ setShowAll()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowAll ( tristate  v = true)
inline

◆ setShowBehavior()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowBehavior ( tristate  v = true)
inline

◆ setShowBehaviorModels()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowBehaviorModels ( tristate  v = true)
inline

◆ setShowBoundingCollisionModels()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowBoundingCollisionModels ( tristate  v = true)
inline

◆ setShowCollision()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowCollision ( tristate  v = true)
inline

◆ setShowCollisionModels()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowCollisionModels ( tristate  v = true)
inline

◆ setShowDetectionOutputs()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowDetectionOutputs ( tristate  v = true)
inline

◆ setShowForceFields()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowForceFields ( tristate  v = true)
inline

◆ setShowInteractionForceFields()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowInteractionForceFields ( tristate  v = true)
inline

◆ setShowMapping()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowMapping ( tristate  v = true)
inline

◆ setShowMappings()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowMappings ( tristate  v = true)
inline

◆ setShowMechanicalMappings()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowMechanicalMappings ( tristate  v = true)
inline

◆ setShowNormals()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowNormals ( tristate  v = true)
inline

◆ setShowOptions()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowOptions ( tristate  v = true)
inline

◆ setShowVisual()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowVisual ( tristate  v = true)
inline

◆ setShowVisualModels()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowVisualModels ( tristate  v = true)
inline

◆ setShowWireFrame()

DisplayFlags& sofa::core::visual::DisplayFlags::setShowWireFrame ( tristate  v = true)
inline

Related details

◆ difference_displayFlags

SOFA_CORE_API DisplayFlags difference_displayFlags ( const DisplayFlags parent,
const DisplayFlags child 
)
friend

◆ merge_displayFlags

SOFA_CORE_API DisplayFlags merge_displayFlags ( const DisplayFlags previous,
const DisplayFlags current 
)
friend

◆ operator<<

SOFA_CORE_API friend std::ostream& operator<< ( std::ostream &  os,
const DisplayFlags flags 
)
friend

◆ operator>>

SOFA_CORE_API friend std::istream& operator>> ( std::istream &  in,
DisplayFlags flags 
)
friend