SoSFArray2D Class Reference
[Fields]

Field containing a 2D array value. More...

#include <Inventor/fields/SoSFArray2D.h>

Inheritance diagram for SoSFArray2D:
SoSFArray SoSField SoField SoTypedObject

List of all members.

Public Member Functions

virtual SoType getTypeId () const
const SoSFArray2Doperator= (const SoSFArray2D &f)
 SoSFArray2D ()
virtual ~SoSFArray2D ()
void setValue (const SbVec2s &size, DataType dataType, const void *data, CopyPolicy copy=COPY)
void setValue (const SbVec2i32 &size, DataType dataType, const void *data, CopyPolicy copy=COPY)
const void * getValue (SbVec2s &size, DataType &dataType) const
const void * getValue (SbVec2i32 &size, DataType &dataType) const
void * startEditing (SbVec2s &size, DataType &dataType)
void * startEditing (SbVec2i32 &size, DataType &dataType)
SbVec2i32 getSize () const

Static Public Member Functions

static SoType getClassTypeId ()

Detailed Description

Field containing a 2D array value.

This field contains a 2D array of values of a specified type. The setValue method allows you to specify the dimensions and type of data the array will contain. The CopyPolicy allows you to control whether Open Inventor will make a copy of the data and, if not, whether the application or Open Inventor is responsible for managing the memory.

In ASCII format, an SoSFArray2D is written to file in the following format:

The example below shows the definition of a 2x2 array of unsigned bytes with data values 0, 1, 2 and 3:

   2 2 UBYTE
   0 1
   2 3
   

Below is a 2x3 array of floats:

   2 3 FLOAT
   0.5 1 .72
   0.33 6.2e4 0.9
   

EXAMPLE

SEE ALSO

SoField, SoSField,


Constructor & Destructor Documentation

SoSFArray2D::SoSFArray2D (  ) 

Default constructor.

virtual SoSFArray2D::~SoSFArray2D (  )  [virtual]

Destructor.


Member Function Documentation

static SoType SoSFArray2D::getClassTypeId (  )  [static]

Returns the type identifier for this class.

Reimplemented from SoSFArray.

SbVec2i32 SoSFArray2D::getSize (  )  const [inline]

Returns the dimensions of the array.

Reimplemented from SoSFArray.

virtual SoType SoSFArray2D::getTypeId (  )  const [virtual]

Returns the type identifier for this specific instance.

Reimplemented from SoSFArray.

const void* SoSFArray2D::getValue ( SbVec2i32 size,
DataType dataType 
) const

Returns a read-only pointer to the 2D array's values and its dimensions and data type.

const void* SoSFArray2D::getValue ( SbVec2s size,
DataType dataType 
) const

Returns a read-only pointer to the 2D array's values and its dimensions and data type.

const SoSFArray2D& SoSFArray2D::operator= ( const SoSFArray2D f  ) 

Copy from another field of same type.

Reimplemented from SoSFArray.

void SoSFArray2D::setValue ( const SbVec2i32 size,
DataType  dataType,
const void *  data,
CopyPolicy  copy = COPY 
)

Fill the 2D array with data of the specified dimensions and type using the specified copy policy.

void SoSFArray2D::setValue ( const SbVec2s size,
DataType  dataType,
const void *  data,
CopyPolicy  copy = COPY 
)

Fill the 2D array with data of the specified dimensions and type using the specified copy policy.

void* SoSFArray2D::startEditing ( SbVec2i32 size,
DataType dataType 
)

Returns a pointer to the internally maintained array that can be modified.

The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. setValue(), etc.). Fields, engines or sensors connected to this field are not triggered until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.

void* SoSFArray2D::startEditing ( SbVec2s size,
DataType dataType 
)

Returns a pointer to the internally maintained array that can be modified.

The values in the array may be changed, but values cannot be added or removed. It is illegal to call any other editing methods between startEditing() and finishEditing() (e.g. setValue(), etc.). Fields, engines or sensors connected to this field are not triggered until finishEditing() is called. Calling finishEditing() always sets the isDefault() flag to FALSE and informs engines and sensors that the field changed, even if none of the values actually were changed.


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

Open Inventor Toolkit reference manual, generated on 25 Feb 2021
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/