VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
Signals | Public Member Functions | Properties | List of all members
PolygonVertexAttributeArray Class Reference

Class storing the values in a vertex attribute array, instantiable from QML. More...

Inheritance diagram for PolygonVertexAttributeArray:
QObject

Signals

void nameChanged ()
 Emitted when name changes. More...
 
void valuesChanged ()
 Emitted when values changes. More...
 

Public Member Functions

 PolygonVertexAttributeArray (QObject *parent=nullptr)
 Construct a PolygonVertexAttributeArray. More...
 
const QStringgetName () const
 Returns name. More...
 
void setName (const QString &value)
 Sets name. More...
 
const QList< float > & getValues () const
 Returns values as a QList of floats. More...
 
void setValues (const QList< float > &values)
 Sets values from a QList of floats. More...
 
QVariantList getValuesAsVariantList () const
 Returns values as a QVariantList. More...
 
void setValuesFromVariantList (const QVariantList &variants)
 Sets values from a QVariantList. More...
 
QString getValuesAsBase64Binary () const
 Returns valuesAsBase64Binary. More...
 
void setValuesFromBase64Binary (const QString &base64Str)
 Sets valuesAsBase64Binary. More...
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
virtual const QMetaObjectmetaObject () const
 
QString objectName () const
 
void setObjectName (const QString &name)
 
bool isWidgetType () const
 
bool isWindowType () const
 
bool signalsBlocked () const
 
bool blockSignals (bool block)
 
QThreadthread () const
 
void moveToThread (QThread *targetThread)
 
int startTimer (int interval, Qt::TimerType timerType)
 
void killTimer (int id)
 
findChild (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QString &name, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegExp &regExp, QFlags< Qt::FindChildOption > options) const
 
QList< T > findChildren (const QRegularExpression &re, QFlags< Qt::FindChildOption > options) const
 
const QObjectList & children () const
 
void setParent (QObject *parent)
 
void installEventFilter (QObject *filterObj)
 
void removeEventFilter (QObject *obj)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const
 
bool disconnect (const QObject *receiver, const char *method) const
 
void dumpObjectTree ()
 
void dumpObjectInfo ()
 
bool setProperty (const char *name, const QVariant &value)
 
QVariant property (const char *name) const
 
QList< QByteArraydynamicPropertyNames () const
 
void destroyed (QObject *obj)
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const
 
bool inherits (const char *className) const
 
void deleteLater ()
 

Properties

QString name
 Name of the attribute represented by this array, mapping it to the corresponding attribute in the Shader (in this case, TerrainShader) used for rendering. More...
 
QVariantList values
 List of floats contained in this array, as a QVariantList. More...
 
QString valuesAsBase64Binary
 List of floats contained in this array, encoded as a base64 string. More...
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
- Protected Member Functions inherited from QObject
QObjectsender () const
 
int senderSignalIndex () const
 
int receivers (const char *signal) const
 
bool isSignalConnected (const QMetaMethod &signal) const
 
virtual void timerEvent (QTimerEvent *event)
 
virtual void childEvent (QChildEvent *event)
 
virtual void customEvent (QEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 

Detailed Description

Class storing the values in a vertex attribute array, instantiable from QML.

Values are stored as raw lists of floats, and must be interpretted by the consumer. For example, if this vertex attribute is actually a 2D float vector, the consumer must de-interleave the list into vectors.

TerrainMeshRenderer converts each of these into an AttributeArray, which are used to fill a Mesh.

See also
PolygonMesh

Constructor & Destructor Documentation

PolygonVertexAttributeArray::PolygonVertexAttributeArray ( QObject parent = nullptr)
explicit

Construct a PolygonVertexAttributeArray.

Parameters
parentParent object

Member Function Documentation

const QString& PolygonVertexAttributeArray::getName ( ) const
inline

Returns name.

const QList<float>& PolygonVertexAttributeArray::getValues ( ) const
inline

Returns values as a QList of floats.

QString PolygonVertexAttributeArray::getValuesAsBase64Binary ( ) const
QVariantList PolygonVertexAttributeArray::getValuesAsVariantList ( ) const

Returns values as a QVariantList.

void PolygonVertexAttributeArray::nameChanged ( )
signal

Emitted when name changes.

void PolygonVertexAttributeArray::setName ( const QString value)

Sets name.

Parameters
valueQString to set name to
void PolygonVertexAttributeArray::setValues ( const QList< float > &  values)

Sets values from a QList of floats.

Parameters
valuesQList of float values to set values to
void PolygonVertexAttributeArray::setValuesFromBase64Binary ( const QString base64Str)

Sets valuesAsBase64Binary.

Parameters
base64StrBase64 encoded array of floats
void PolygonVertexAttributeArray::setValuesFromVariantList ( const QVariantList &  variants)

Sets values from a QVariantList.

Parameters
variantsQVariantList to interpret as a list of floats to set values to
void PolygonVertexAttributeArray::valuesChanged ( )
signal

Emitted when values changes.

Property Documentation

QString PolygonVertexAttributeArray::name
readwrite

Name of the attribute represented by this array, mapping it to the corresponding attribute in the Shader (in this case, TerrainShader) used for rendering.

QVariantList PolygonVertexAttributeArray::values
readwrite

List of floats contained in this array, as a QVariantList.

QString PolygonVertexAttributeArray::valuesAsBase64Binary
readwrite

List of floats contained in this array, encoded as a base64 string.

Data is encoded as follows:

  • float values are treated as a packed array of single precision IEEE floats
  • that array is then reinterpreted as a byte array
  • the byte array is in turn encoded as base64

Decoding reverses the process.

Note
This property is used for initialization (i.e. level load) efficiency. values can also be used, but it requires excessive QVariant creation and copying, as well as significantly more text processing.