SOFA plugin: image  master
Open source framework for multi-physics simuation
sofa::defaulttype::VectorVis Class Reference

#include <VectorVis.h>

Detailed Description

Holds data regarding visualization of vector data so that it can be accessed and manipulated by the VectorVisualizationDataWidget

Protected Attributes

int subsampleXY
 
int subsampleZ
 
int shapeScale
 
bool rgb
 
bool shape
 
std::string tensorOrder
 

Public Member Functions

 VectorVis (int _subsampleXY=5, int _subsampleZ=5, int _shapeScale=10, bool _rgb=true, bool _shape=false, std::string _tensorOrder="LowerTriRowMajor")
 
Accessor/Getter functions
int getSubsampleXY () const
 
int getSubsampleZ () const
 
int getShapeScale () const
 
bool getRgb () const
 
bool getShape () const
 
std::string getTensorOrder () const
 
Mutator/Setter functions
void setSubsampleXY (int _subsampleXY)
 
void setSubsampleZ (int _subsampleZ)
 
void setShapeScale (int scale)
 
void setRgb (bool _rgb)
 
void setShape (bool vis)
 
void setTensorOrder (std::string _tensorOrder)
 

Static Public Member Functions

static const char * Name ()
 

Friends

std::istream & operator>> (std::istream &in, VectorVis &v)
 
std::ostream & operator<< (std::ostream &out, const VectorVis &v)
 

Attribute details

◆ rgb

bool sofa::defaulttype::VectorVis::rgb
protected

When true, a 3 channel image is displayed as an RGB image. When false, the image is displayed in greyscale, with the value being the norm of the 3 channels.

◆ shape

bool sofa::defaulttype::VectorVis::shape
protected

When true, a shape is drawn representing the data. In a 3 channel image, that shape is an arrow, and in a 6 channel image, the shape is an ellipsoid.

◆ shapeScale

int sofa::defaulttype::VectorVis::shapeScale
protected

The size of the shape is multiplied by this value before it is drawn.

◆ subsampleXY

int sofa::defaulttype::VectorVis::subsampleXY
protected

One shape is drawn every subsampleXY values in both the X plane and the Y plane. So, as subsampleXY is increased, the density of the shapes decreases.

◆ subsampleZ

int sofa::defaulttype::VectorVis::subsampleZ
protected

One shape is drawn every subsampleZ values in Z plane. So, as subsampleZ is increased, the density of the shapes decreases.

◆ tensorOrder

std::string sofa::defaulttype::VectorVis::tensorOrder
protected

Specifies the order that tensor information is encoded. Possible values are LowerTriRowMajor, UpperTriRowMajor, DiagonalFirst

Constructor details

◆ VectorVis()

sofa::defaulttype::VectorVis::VectorVis ( int  _subsampleXY = 5,
int  _subsampleZ = 5,
int  _shapeScale = 10,
bool  _rgb = true,
bool  _shape = false,
std::string  _tensorOrder = "LowerTriRowMajor" 
)
inline

Function details

◆ getRgb()

bool sofa::defaulttype::VectorVis::getRgb ( ) const
inline

◆ getShape()

bool sofa::defaulttype::VectorVis::getShape ( ) const
inline

◆ getShapeScale()

int sofa::defaulttype::VectorVis::getShapeScale ( ) const
inline

◆ getSubsampleXY()

int sofa::defaulttype::VectorVis::getSubsampleXY ( ) const
inline

◆ getSubsampleZ()

int sofa::defaulttype::VectorVis::getSubsampleZ ( ) const
inline

◆ getTensorOrder()

std::string sofa::defaulttype::VectorVis::getTensorOrder ( ) const
inline

◆ Name()

static const char* sofa::defaulttype::VectorVis::Name ( )
inlinestatic

◆ setRgb()

void sofa::defaulttype::VectorVis::setRgb ( bool  _rgb)
inline

◆ setShape()

void sofa::defaulttype::VectorVis::setShape ( bool  vis)
inline

◆ setShapeScale()

void sofa::defaulttype::VectorVis::setShapeScale ( int  scale)
inline

◆ setSubsampleXY()

void sofa::defaulttype::VectorVis::setSubsampleXY ( int  _subsampleXY)
inline

◆ setSubsampleZ()

void sofa::defaulttype::VectorVis::setSubsampleZ ( int  _subsampleZ)
inline

◆ setTensorOrder()

void sofa::defaulttype::VectorVis::setTensorOrder ( std::string  _tensorOrder)
inline

Related details

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const VectorVis v 
)
friend

Stream operator that allows data to be sent to the GUI

◆ operator>>

std::istream& operator>> ( std::istream &  in,
VectorVis v 
)
friend

Stream operator that allows data to be received from the GUI