Added getParameterIndexForName
--HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4077
This commit is contained in:
@@ -63,6 +63,7 @@ typedef enum KREngineParameterType {KRENGINE_PARAMETER_INT, KRENGINE_PARAMETER_F
|
|||||||
-(double)getParameterValueWithIndex: (int)i;
|
-(double)getParameterValueWithIndex: (int)i;
|
||||||
-(void)setParameterValueWithIndex: (int)i Value: (double)v;
|
-(void)setParameterValueWithIndex: (int)i Value: (double)v;
|
||||||
-(void)setParameterValueWithName: (NSString *)name Value: (double)v;
|
-(void)setParameterValueWithName: (NSString *)name Value: (double)v;
|
||||||
|
-(int)getParameterIndexWithName: (NSString *)name;
|
||||||
|
|
||||||
- (void)renderScene: (KRScene *)pScene WithViewMatrix: (KRMat4)viewMatrix;
|
- (void)renderScene: (KRScene *)pScene WithViewMatrix: (KRMat4)viewMatrix;
|
||||||
- (void)renderScene: (KRScene *)pScene WithPosition: (KRVector3)position Yaw: (GLfloat)yaw Pitch: (GLfloat)pitch Roll: (GLfloat)roll;
|
- (void)renderScene: (KRScene *)pScene WithPosition: (KRVector3)position Yaw: (GLfloat)yaw Pitch: (GLfloat)pitch Roll: (GLfloat)roll;
|
||||||
|
|||||||
@@ -437,6 +437,18 @@ double const PI = 3.141592653589793f;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(int)getParameterIndexWithName: (NSString *)name
|
||||||
|
{
|
||||||
|
int cParameters = [self getParameterCount];
|
||||||
|
for(int i=0; i < cParameters; i++) {
|
||||||
|
if([[self getParameterNameWithIndex:i] caseInsensitiveCompare:name] == NSOrderedSame)
|
||||||
|
{
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return -1; // not found
|
||||||
|
}
|
||||||
|
|
||||||
- (void)setNearZ: (double)dNearZ
|
- (void)setNearZ: (double)dNearZ
|
||||||
{
|
{
|
||||||
if(_camera->perspective_nearz != dNearZ) {
|
if(_camera->perspective_nearz != dNearZ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user