MeVisLab Scripting Reference
MLABMatrixField Class Reference

#include <mlabMatrixField.h>

Inherits MLABField.

Public Slots

Scripting access.


double value (int i, int j)
 
void setMatrixValue (const QVariantList &value)
 
void updateMatrixValue (const QVariantList &value)
 
void setValue (const QVariantList &value)
 
void updateValue (const QVariantList &value)
 
QVariantList matrixValue ()
 
SbMatrixd inventorValue () const
 
QVariant numPyValue () const
 
void setValue (const SbMatrixd &value)
 
void setValue (const SbMatrix &value)
 
- Public Slots inherited from MLABField
bool isInventorField ()
 
bool isMLField ()
 
QString getType () const
 
QString getName () const
 
virtual QString stringValue ()
 
virtual QString persistentStringValue ()
 
virtual void setPersistentStringValue (const QString &value)
 
QString truncatedStringValue (int maxChars=80)
 
virtual QString stringValueForProfiling ()
 
virtual void touch ()
 
MLABFieldOwnerowner ()
 
MLABFieldconnectedField ()
 
MLABFieldinputField ()
 
bool isConnected ()
 
bool isConnectedToFieldInSameNetwork ()
 
int outputCount ()
 
MLABFieldoutputField (int index)
 
QList< MLABField * > outputFields ()
 
bool connectFrom (MLABField *field)
 
void disconnect ()
 
void disconnectOutputs ()
 
void disconnectAll ()
 
bool connectFromUndoable (MLABField *field)
 
virtual bool isConnectionPossible (MLABField *field)
 
bool isConnectionInSameNetworkPossible (MLABField *field)
 
bool isInSameNetwork (MLABField *field)
 
virtual QString toolTipInfo ()
 
void setPriority (int aPriority)
 
int priority ()
 
void setProxy (bool flag)
 
bool isProxy ()
 
void setComment (const QString &comment)
 
QString comment ()
 
void setTitle (const QString &title)
 
QString title ()
 
QString fullName () const
 
bool isHidden ()
 
void setHidden (bool flag)
 
bool isIgnored ()
 
void setIgnored (bool flag)
 
bool isFilePath ()
 
void setIsFilePath (bool flag)
 
bool isInterfaceField ()
 
bool isParameterField ()
 
bool isInput ()
 
bool isOutput ()
 
bool isInOut ()
 
QString infoString ()
 
bool isPersistent () const
 
bool isEditable () const
 
bool triggersLoading () const
 
void setTriggersLoading (bool flag)
 

Signals

void valueChanged ()
 

Public Member Functions

void setStringValue (const QString &value) override
 

Properties

QVariantList value
 

Detailed Description

A field containing a 4x4 matrix.

The "value" property of this field is an Array of 4 Arrays containing 4 double values.

The value can be accessed via the value property or the matrixValue() method:

val = ctx.field("somematrix").value
for i in range(0,4):
for j in range(0,4):
MLAB.log(val[i][j])
Access to all global functions and objects of MLAB.
Definition mlabGlobalScriptAccess.h:79

or as a string value (as 16 doubles separated with spaces):

MLAB.log(ctx.field("somematrix").stringValue())
void log(const QString &text)
Logs the given text to the console.

The value can be set via the value property or the matrixValue() method.

Member Function Documentation

◆ inventorValue

SbMatrixd MLABMatrixField::inventorValue ( ) const
slot

Gets the value as Inventor matrix.

◆ matrixValue

QVariantList MLABMatrixField::matrixValue ( )
slot

Returns the matrix value as list of 4 vectors.

◆ numPyValue

QVariant MLABMatrixField::numPyValue ( ) const
slot

Get the value as 2D numpy array.

◆ setMatrixValue

void MLABMatrixField::setMatrixValue ( const QVariantList & value)
slot

Sets the matrix value as a list of 4 vectors with 4 components each..

◆ setStringValue()

void MLABMatrixField::setStringValue ( const QString & )
overridevirtual

Sets the value of the field as a string value.

Reimplemented from MLABField.

◆ setValue [1/3]

void MLABMatrixField::setValue ( const QVariantList & value)
inlineslot

Sets matrix value as a list of 4 vectors with 4 components each.

◆ setValue [2/3]

void MLABMatrixField::setValue ( const SbMatrix & value)
slot

Sets the value from an Inventor matrix.

◆ setValue [3/3]

void MLABMatrixField::setValue ( const SbMatrixd & value)
slot

Sets the value from an Inventor matrix.

◆ updateMatrixValue

void MLABMatrixField::updateMatrixValue ( const QVariantList & value)
slot

Sets the matrix value if different from the current value.

◆ updateValue

void MLABMatrixField::updateValue ( const QVariantList & value)
inlineslot

Sets the matrix value if different from the current value.

◆ value

double MLABMatrixField::value ( int i,
int j )
inlineslot

Returns the matrix cell value at index i, j.

◆ valueChanged

void MLABMatrixField::valueChanged ( )
signal

Signal that is emitted when the field's value changes.

Property Documentation

◆ value

QVariantList MLABMatrixField::value
readwrite

Value of the matrix as a list of 4 vectors with 4 doubles each.