|
| SoTextureCoordinateBundle (SoAction *action, bool forRendering, bool setUpDefault=TRUE) |
| Constructor - takes the action the bundle is used for and a flag to indicate whether the bundle is being used for rendering.
|
|
| ~SoTextureCoordinateBundle () |
| Destructor.
|
|
bool | needCoordinates () const |
| Returns TRUE if texture coordinates are needed at all.
|
|
bool | isFunction () const |
| return value to determine which get() to use.
|
|
SbVec4f | get (const SbVec3f &point, const SbVec3f &normal) const |
| Returns texture coordinate computed by function during primitive generation or rendering.
|
|
SbVec4f | get (int index) const |
| Returns indexed texture coordinate during primitive generation or rendering.
|
|
void | send (int index) const |
| Sends indexed texture coordinate to GL during rendering.
|
|
This class provides a fairly simple interface to texture coordinate handling, including default texture coordinate generation. This can be used during either rendering or primitive generation.
This class can be used during either rendering or primitive generation. For primitive generation, there are two cases, distinguished by the flag returned by isFunction(). If this flag is TRUE, the texture coordinates are to be generated using the get(point, normal) method, which uses a software texture coordinate function. (This process is also used for texture coordinates that are generated by default when necessary - in this case, the function does a linear map across two sides of the bounding box of the shape.) If the isFunction() flag is FALSE, the coordinates are accessed directly from the element using the get(index) method.
For GL rendering, there is an additional case. If needCoordinates() returns FALSE, no texture coordinates need to be sent at all, and the bundle does not have to be used for anything else. Otherwise, send(index) should be used.
Definition at line 91 of file SoTextureCoordinateBundle.h.