Qt 4.8
Public Types | Public Functions | Properties | List of all members
QVertexIndexVector Class Reference

#include <qtriangulator_p.h>

Public Types

enum  Type { UnsignedInt, UnsignedShort }
 

Public Functions

const void * data () const
 
QVertexIndexVectoroperator= (const QVertexIndexVector &other)
 
void setDataUint (const QVector< quint32 > &data)
 
void setDataUshort (const QVector< quint16 > &data)
 
int size () const
 
Type type () const
 

Properties

QVector< quint16indices16
 
QVector< quint32indices32
 
Type t
 

Detailed Description

Definition at line 61 of file qtriangulator_p.h.

Enumerations

◆ Type

Enumerator
UnsignedInt 
UnsignedShort 

Definition at line 64 of file qtriangulator_p.h.

Functions

◆ data()

const void* QVertexIndexVector::data ( ) const
inline

Definition at line 83 of file qtriangulator_p.h.

Referenced by QGL2PaintEngineExPrivate::fill(), setDataUint(), and setDataUshort().

84  {
85  if (t == UnsignedInt)
86  return indices32.data();
87  return indices16.data();
88  }
QVector< quint32 > indices32
QVector< quint16 > indices16
T * data()
Returns a pointer to the data stored in the vector.
Definition: qvector.h:152

◆ operator=()

QVertexIndexVector& QVertexIndexVector::operator= ( const QVertexIndexVector other)
inline

Definition at line 97 of file qtriangulator_p.h.

98  {
99  if (t == UnsignedInt)
100  indices32 = other.indices32;
101  else
102  indices16 = other.indices16;
103 
104  return *this;
105  }
QVector< quint32 > indices32
QVector< quint16 > indices16

◆ setDataUint()

void QVertexIndexVector::setDataUint ( const QVector< quint32 > &  data)
inline

Definition at line 71 of file qtriangulator_p.h.

Referenced by qPolyline(), and qTriangulate().

72  {
73  t = UnsignedInt;
74  indices32 = data;
75  }
QVector< quint32 > indices32
const void * data() const

◆ setDataUshort()

void QVertexIndexVector::setDataUshort ( const QVector< quint16 > &  data)
inline

Definition at line 77 of file qtriangulator_p.h.

Referenced by qPolyline(), and qTriangulate().

78  {
79  t = UnsignedShort;
80  indices16 = data;
81  }
const void * data() const
QVector< quint16 > indices16

◆ size()

int QVertexIndexVector::size ( ) const
inline

Definition at line 90 of file qtriangulator_p.h.

Referenced by QGL2PaintEngineExPrivate::fill().

91  {
92  if (t == UnsignedInt)
93  return indices32.size();
94  return indices16.size();
95  }
QVector< quint32 > indices32
QVector< quint16 > indices16
int size() const
Returns the number of items in the vector.
Definition: qvector.h:137

◆ type()

Type QVertexIndexVector::type ( ) const
inline

Definition at line 69 of file qtriangulator_p.h.

69 { return t; }

Properties

◆ indices16

QVector<quint16> QVertexIndexVector::indices16
private

Definition at line 111 of file qtriangulator_p.h.

Referenced by data(), operator=(), setDataUshort(), and size().

◆ indices32

QVector<quint32> QVertexIndexVector::indices32
private

Definition at line 110 of file qtriangulator_p.h.

Referenced by data(), operator=(), setDataUint(), and size().

◆ t

Type QVertexIndexVector::t
private

Definition at line 109 of file qtriangulator_p.h.

Referenced by data(), operator=(), setDataUint(), setDataUshort(), size(), and type().


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