Set_Parameter

Functions

void Set_Parameter (int number, const float *parameters)
 Defines texture mapping coordinates for a previously opened Shell or Mesh vertex. More...
 
void UnSet_Parameter (void)
 Removes all settings established by a previous call to Set_Parameter(). More...
 

Detailed Description

Function Documentation

◆ Set_Parameter()

void Set_Parameter ( int  number,
const float *  parameters 
)

Defines texture mapping coordinates for a previously opened Shell or Mesh vertex.

Parameters
number- The number of parameters to be set on the currently open vertex (the size of the parameters array). Note that the number of parameters per vertex will be made consistent for all vertices of the shell or mesh.
parameters- A one dimensional array of floating point vertex parameters. Passed by reference always.

DETAILS

Texture mapping works by linking every pixel of a shell or mesh face to a corresponding "texel" (texture element) of a HOOPS image (one of many possible texture sources). As a textured face is being drawn, the referenced image texels are used to modulate one (or more) of the surface's material properties. Defined texture names (see Define_Texture() ) are used with the Set_Color() routine to assign textures to specific material properties.

The most common method of defining the connection between shell or mesh surface pixels and image texels is with a "texture coordinate" at each vertex, set with the Set_Parameter() routine. The number parameter defines how many parameters will be set at each vertex of the shell or mesh. Normally you would set either one, two, or three parameters per vertex, which define texture mapping coordinates as follows (see the "parameterization source" option of Define_Texture() ):

one (u) texture coordinate

two (u, v) texture coordinate

three (u, v, w) texture coordinate

For image based textures, two texture parameters are normally used.

Set_Parameter() is only meaningful within the scope of an Open_Vertex() , and cannot be set as a segment attribute. The MSet_Vertex_Parameters() routine is provided as a convenient way to rapidly set a large number of parameters on many vertices at once.

Set_Parameter() may only be used on Shell or Mesh geometry.

NOTES

Currently if you set more than three parameters per vertex, the first three will be interpreted as a (u, v, w) texture mapping coordinate and the remainder will be ignored.

If you later add to the number of parameters defined for any vertex, all other vertices of the shell or mesh will also grow to have the same number of parameters. Any vertex parameters you fail to supply will be initialized to zero.

If you call Set_Parameter() with a value of number that is less than the current number of parameters per vertex, the new values are assigned to the lowest numbered columns of the parameters array.

The UnSet_Parameter() routine will remove all vertex parameters of all vertices of the shell or mesh.

RESTRICTIONS

See also
Define_Texture, MSet_Vertex_Parameters, Open_Vertex, Set_Color, Set_Rendering_Options.

◆ UnSet_Parameter()

void UnSet_Parameter ( void  )

Removes all settings established by a previous call to Set_Parameter().

DETAILS

No additional details. See Set_Parameter()