4.5. Table (element)

<table> ‐ An element for the definition of table variables

4.5.1. Attributes

NameTypeDefaults
idSTRINGNone (required)
typeSTRINGfloat
sizeINTEGERNone (required)
valueINTEGER LIST(0,0,...,0)
valueFLOAT LIST(0.0,0.0,...,0.0)
valueSTRING LISTList of empty strings
indexINTEGERNone (optional)

4.5.2. Description

The <table> element is used to define a table value attached to a node in a scene graph. The table element must be located inside a node.

The string value of the type attribute is equal to int in the case of an integer table, It is equal to float in the case of a float table, and equal to string in the case of a string table.

The integer values l of the size attribute defines the size of the table.

The initial value of the table is defined by the value of the value attribute. This value must have the type of the table as defined by the type attribute. This value is a list of l values surrounded by parentheses and separated by commas. If the integer value i of the index attribute is provided, the value is a scalar value corresponding to the ith element of the table.

4.5.3. Expected children

None.

4.5.4. Example

The following example, defines the string table named birdNames. The matrix has 9 elements associated with the strings 'seagull1', 'seagull2'...

<table id="birdNames" type="string" size="9" 
         value="('seagull1','seagull2','seagull3','seagull4','seagull5',
                 'seagull6','seagull7','seagull8','seagull9')" />