Inviwo 0.9.12-pre
Inviwo documentation
Loading...
Searching...
No Matches
inviwo::TFEditorPrimitive Class Referenceabstract
+ Inheritance diagram for inviwo::TFEditorPrimitive:

Public Member Functions

 TFEditorPrimitive (TFPrimitive &primitive)
 
TFPrimitivegetPrimitive ()
 
const TFPrimitivegetPrimitive () const
 
void setPosition (double pos)
 
double getPosition () const
 
void setColor (const vec4 &color)
 
void setColor (const vec3 &color)
 
void setAlpha (float alpha)
 
const vec4 & getColor () const
 
double getSize () const
 
void beginMouseDrag ()
 
virtual TFControlPointConnectionleft () const
 
virtual TFControlPointConnectionright () const
 
virtual void setLeft (TFControlPointConnection *)
 
virtual void setRight (TFControlPointConnection *)
 
- Public Member Functions inherited from inviwo::TFPrimitiveObserver
- Public Member Functions inherited from inviwo::Observer
 Observer (const Observer &other)
 
 Observer (Observer &&other)
 
Observeroperator= (Observer &&other)
 
Observeroperator= (const Observer &other)
 
virtual ~Observer ()
 
void removeObservation (ObservableInterface *observable)
 
void removeObservations ()
 

Protected Member Functions

virtual QVariant itemChange (GraphicsItemChange change, const QVariant &value) override
 
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event) override
 
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override
 
virtual void onTFPrimitiveChange (const TFPrimitive &p) override
 
virtual int zLevel () const =0
 
QPointF constrainPosToXorY (QPointF pos) const
 
void setHovered (bool hover)
 
void updateLabel ()
 
- Protected Member Functions inherited from inviwo::Observer
void addObservation (ObservableInterface *observable)
 

Protected Attributes

TFPrimitivedata_
 
bool isEditing_
 
bool hovered_
 
std::unique_ptr< QGraphicsSimpleTextItem > label_
 
QPointF cachedPosition_
 used for restricting to horizontal/vertical movement
 
- Protected Attributes inherited from inviwo::Observer
std::unordered_set< ObservableInterface * > observables_
 

Friends

IVW_MODULE_QTWIDGETS_API bool operator== (const TFEditorPrimitive &lhs, const TFEditorPrimitive &rhs)
 
IVW_MODULE_QTWIDGETS_API bool operator< (const TFEditorPrimitive &lhs, const TFEditorPrimitive &rhs)
 

Constructor & Destructor Documentation

◆ TFEditorPrimitive()

inviwo::TFEditorPrimitive::TFEditorPrimitive ( TFPrimitive & primitive)
explicit

Constructs a TransferFunction editor primitive. The graphics item is positioned at the primitive location (scalar value and opacity) within the scene. The graphical representation should thus be centered around (0,0) in local coordinates.

Parameters
primitivethe primitive

Member Function Documentation

◆ onTFPrimitiveChange()

virtual void inviwo::TFEditorPrimitive::onTFPrimitiveChange ( const TFPrimitive & p)
overrideprotectedvirtual

Reimplemented from inviwo::TFPrimitiveObserver.


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