Coin: SoTextureCoordinateBundle Class Reference

| Coin3D is Free Software, published under the BSD 3-clause license. | https://coin3d.github.io https://www.kongsberg.com/en/kogt/

Public Member Functions | List of all members
SoTextureCoordinateBundle Class Reference
Bundle Classes

The SoTextureCoordinateBundle class simplifies texture coordinate handling. More...

`#include <Inventor/bundles/SoTextureCoordinateBundle.h>`

Inheritance diagram for SoTextureCoordinateBundle:

## Public Member Functions
| SoTextureCoordinateBundle (SoAction *const action, const SbBool forRendering, const SbBool setUpDefault=TRUE)
| ~SoTextureCoordinateBundle ()
SbBool | needCoordinates (void) const
SbBool | isFunction (void) const
const SbVec4f & | get (const int index)
const SbVec4f & | get (const SbVec3f &point, const SbVec3f &normal)
void | send (const int index) const
void | send (const int index, const SbVec3f &point, const SbVec3f &normal) const
SbBool | needIndices (void) const

## Additional Inherited Members
Protected Member Functions inherited from SoBundle
| SoBundle (SoAction *action)
| ~SoBundle ()
Protected Attributes inherited from SoBundle
SoState * | state
| The state of the current action.

## Detailed Description

The SoTextureCoordinateBundle class simplifies texture coordinate handling.

It is unlikely that application programmers should need to know how to use this class, as it is mostly intended for internal use.

## Constructor & Destructor Documentation

## ◆ SoTextureCoordinateBundle()

SoTextureCoordinateBundle::SoTextureCoordinateBundle | ( | SoAction *const | action,
|  | const SbBool | forRendering,
|  | const SbBool | setUpDefault = TRUE )

Constructor with action being the action applied to the node. The forRendering parameter must be TRUE if the bundle is to be used for sending texture coordinates to GL during rendering. The setUpDefault must be TRUE if default texture coordinates should be generated.

## ◆ ~SoTextureCoordinateBundle()

SoTextureCoordinateBundle::~SoTextureCoordinateBundle | ( |  | ) |

Destructor.

## Member Function Documentation

## ◆ needCoordinates()

SbBool SoTextureCoordinateBundle::needCoordinates | ( | void |  | ) | const

Returns TRUE if texture coordinates are needed during rendering.

## ◆ isFunction()

SbBool SoTextureCoordinateBundle::isFunction | ( | void |  | ) | const

Returns TRUE if a texture coordinate function should be used.

## ◆ get() [1/2]

const SbVec4f & SoTextureCoordinateBundle::get | ( | const int | index | ) |

Returns the texture coordinates at index index. Should only be used if SoTextureCoordinateBundle::isFunction() is FALSE.

## ◆ get() [2/2]

const SbVec4f & SoTextureCoordinateBundle::get | ( | const SbVec3f & | point,
|  | const SbVec3f & | normal )

Returns the texture coordinates based on point and normal. Should only be used if SoTextureCoordinateBundle::isFunction() is TRUE.

## ◆ send() [1/2]

void SoTextureCoordinateBundle::send | ( | const int | index | ) | const
| inline

Send texture coordinates to GL. Should only be used if SoTextureCoordinateBundle::isFunction() is FALSE.

## ◆ send() [2/2]

void SoTextureCoordinateBundle::send | ( | const int | index,
|  | const SbVec3f & | point,
|  | const SbVec3f & | normal ) const
| inline

Convenience function that will make it transparent to the rendering code if ordinary texture coordinates or function texture coordinates are used.

## ◆ needIndices()

SbBool SoTextureCoordinateBundle::needIndices | ( | void |  | ) | const

Returns TRUE if isFunction() is TRUE, but the texture coordinate indices are needed either by bump mapping or by one of the other texture units.

Since
  Coin 2.2

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

- SoTextureCoordinateBundle.h
- SoTextureCoordinateBundle.cpp