Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# Ogre::FloatGpuParameterControllerValue Class Reference

Predefined controller value for setting a single floating- point value in a constant paramter of a vertex or fragment program. More...

`#include <OgrePredefinedControllers.h>`

Inheritance diagram for Ogre::FloatGpuParameterControllerValue:

[legend]
List of all members.

## Public Methods

| FloatGpuParameterControllerValue (GpuProgramParameters *params, size_t index)
| Constructor.
| ~FloatGpuParameterControllerValue ()
Real | getValue (void) const
void | setValue (Real value)

## Protected Attributes

GpuProgramParameters * | mParams
| The parameters to access.
size_t | mParamIndex
| The index of the parameter to e read or set.

## Detailed Description

Predefined controller value for setting a single floating- point value in a constant paramter of a vertex or fragment program.

Remarks:
  Any value is accepted, it is propagated into the 'x' component of the constant register identified by the index. If you need to use named parameters, retrieve the index from the param object before setting this controller up.

Note:
  Retrieving a value from the program parameters is not currently supported, therefore do not use this controller value as a source, only as a target.

Definition at line 128 of file OgrePredefinedControllers.h.

## Constructor & Destructor Documentation

Ogre::FloatGpuParameterControllerValue::FloatGpuParameterControllerValue | ( | GpuProgramParameters * | params,
|  | size_t | index
| ) |

Constructor.

Parameters:

  params | The parameters object to access
  index | The index of the parameter to be set

Definition at line 175 of file OgrePredefinedControllers.cpp.

References params.

Ogre::FloatGpuParameterControllerValue::~FloatGpuParameterControllerValue | ( |  | ) |

| Definition at line 145 of file OgrePredefinedControllers.h.

## Member Function Documentation

Real Ogre::FloatGpuParameterControllerValue::getValue | ( | void |  | ) | const`[virtual]`

| Implements Ogre::ControllerValue< Real >. Definition at line 181 of file OgrePredefinedControllers.cpp. References Ogre::Real.

void Ogre::FloatGpuParameterControllerValue::setValue | ( | Real | value | ) | `[virtual]`

| Implements Ogre::ControllerValue< Real >. Definition at line 187 of file OgrePredefinedControllers.cpp. References mParamIndex, mParams, Ogre::Real, Ogre::GpuProgramParameters::setConstant(), and Ogre::Vector4::x.

## Member Data Documentation

size_t Ogre::FloatGpuParameterControllerValue::mParamIndex`[protected]`

| The index of the parameter to e read or set. Definition at line 134 of file OgrePredefinedControllers.h. Referenced by setValue().

GpuProgramParameters* Ogre::FloatGpuParameterControllerValue::mParams`[protected]`

| The parameters to access. Definition at line 132 of file OgrePredefinedControllers.h. Referenced by setValue().

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

- OgrePredefinedControllers.h
- OgrePredefinedControllers.cpp

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:50:33 2004