GetFeatureRange
Top  Previous  Next

Description

Returns the minimum and maximum attributes of the specified feature.

[C++]
int
 GetFeatureRange(const char* feature, float* pMin, float* pMax);


Parameters
[C/C++]
 
[in] const char* feature  
Name of the feature to assign the attributes to. Must be an existing feature of the integer or floating point type.  
 
[out] float* pMin  
Pointer to a value that receives the feature's minimum.  
 
[out] float* pMax  
Pointer to a value that receives the feature's maximum.  
 

Return Values


S_OK  
Success  
E_FAIL  
Failure  
E_NOINTERFACE  
Feature does not exist  
 
 
Example

This fragment of code instantiates a camera object, creates a floating point feature, sets up its range and verifies the values of the minimum and maximum :

static CGevCamera* m_pCamera; double min, max;  
m_pCamera = createCamera();  
 
m_pCamera->CreateFeature(FEATURE_TYPE_FLOAT, "TestFeatureFloat", "Root", FEATURE_ACCESS_RW);  
m_pCamera->SetFeatureRange("TestFeatureFloat", 0, 1000);  
m_pCamera->SetFeatureFloatValue("TestFeatureFloat", 3.1415926);  
m_pCamera->GetFeatureRange("TestFeatureFloat", &min, &max);  
 

Remarks


This method will work only if SetFeatureRange or SetFeatureIntRange was previously called for the specified feature.