Rechercher une page de manuel
cgGetParameterValuedr
Langue: en
Version: 47030 (openSuse - 09/10/07)
Section: 3 (Bibliothèques de fonctions)
NAME
cgGetParameterValuedr - get the value of any numeric parameterSYNOPSIS
#include <Cg/cg.h>
int cgGetParameterValuedr( CGparameter param, int nelements, double * v );
PARAMETERS
- param
- The parameter whose value will be retrieved.
- nelements
- The number of elements in array v.
- v
- Destination buffer into which the parameter values will be written.
RETURN VALUES
Returns the total number of values written to v.DESCRIPTION
cgGetParameterValuedr allows the application to get the value(s) from any numeric parameter or parameter array. The value(s) are returned as doubles in v.The given parameter must be a scalar, vector, matrix, or a (possibly multidimensional) array of scalars, vectors, or matrices.
Any matrices referenced by param will be copied in row-major order.
The size of v is passed as nelements. If v is smaller than the total number of values in the given source parameter, CG_NOT_ENOUGH_DATA_ERROR is generated.
The total number of values in a parameter, ntotal, may be computed as follow:
int nrows = cgGetParameterRows(param); int ncols = cgGetParameterColumns(param); int asize = cgGetArrayTotalSize(param); int ntotal = nrows*ncols; if (asize > 0) ntotal *= asize;
EXAMPLES
to-be-writtenERRORS
CG_INVALID_PARAM_HANDLE_ERROR is generated if param is not a valid parameter.CG_INVALID_POINTER_ERROR is generated if v is NULL.
CG_NOT_ENOUGH_DATA_ERROR is generated if nelements is less than the total size of param.
CG_NON_NUMERIC_PARAMETER_ERROR is generated if param is of a non-numeric type.
HISTORY
cgGetParameterValuedr was introduced in Cg 1.4.SEE ALSO
the cgGetParameterValue manpage, the cgSetParameterValue manpage, the cgGetParameterRows manpage, the cgGetParameterColumns manpage, the cgGetArrayTotalSize manpageContenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre