2011-10-25 05:03:10 +00:00
|
|
|
//
|
|
|
|
|
// KREngine.h
|
2012-03-15 20:09:01 +00:00
|
|
|
// KREngine
|
2011-10-25 05:03:10 +00:00
|
|
|
//
|
2012-03-15 20:09:01 +00:00
|
|
|
// Copyright 2012 Kearwood Gilbert. All rights reserved.
|
2011-10-25 06:16:47 +00:00
|
|
|
//
|
|
|
|
|
// Redistribution and use in source and binary forms, with or without modification, are
|
|
|
|
|
// permitted provided that the following conditions are met:
|
|
|
|
|
//
|
|
|
|
|
// 1. Redistributions of source code must retain the above copyright notice, this list of
|
|
|
|
|
// conditions and the following disclaimer.
|
|
|
|
|
//
|
|
|
|
|
// 2. Redistributions in binary form must reproduce the above copyright notice, this list
|
|
|
|
|
// of conditions and the following disclaimer in the documentation and/or other materials
|
|
|
|
|
// provided with the distribution.
|
|
|
|
|
//
|
|
|
|
|
// THIS SOFTWARE IS PROVIDED BY KEARWOOD GILBERT ''AS IS'' AND ANY EXPRESS OR IMPLIED
|
|
|
|
|
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KEARWOOD GILBERT OR
|
|
|
|
|
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
|
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
|
|
|
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
|
|
|
|
// ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
|
|
|
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
|
|
|
|
// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
|
//
|
|
|
|
|
// The views and conclusions contained in the software and documentation are those of the
|
|
|
|
|
// authors and should not be interpreted as representing official policies, either expressed
|
|
|
|
|
// or implied, of Kearwood Gilbert.
|
2011-10-25 05:03:10 +00:00
|
|
|
//
|
|
|
|
|
|
2013-01-11 03:21:19 +00:00
|
|
|
// #include "KRTextureManager.h"
|
|
|
|
|
#include "KRMat4.h"
|
|
|
|
|
#include "KRVector3.h"
|
|
|
|
|
#include "KRMesh.h"
|
|
|
|
|
#include "KRScene.h"
|
|
|
|
|
#include "KRContext.h"
|
|
|
|
|
#include "KRCamera.h"
|
2011-10-25 05:03:10 +00:00
|
|
|
|
2013-01-11 03:21:19 +00:00
|
|
|
#include "KREngine-common.h"
|
2012-03-15 23:58:37 +00:00
|
|
|
|
2011-10-25 05:03:10 +00:00
|
|
|
typedef enum KREngineParameterType {KRENGINE_PARAMETER_INT, KRENGINE_PARAMETER_FLOAT, KRENGINE_PARAMETER_BOOL} KREngineParameterType;
|
|
|
|
|
|
2013-03-07 18:22:14 -08:00
|
|
|
namespace kraken {
|
|
|
|
|
void set_parameter(const std::string ¶meter_name, float parameter_value);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#ifdef __OBJC__
|
2011-10-25 05:03:10 +00:00
|
|
|
|
|
|
|
|
@interface KREngine : NSObject
|
|
|
|
|
|
2012-10-19 18:28:18 +00:00
|
|
|
+ (KREngine *)sharedInstance;
|
|
|
|
|
|
2012-08-16 22:50:30 +00:00
|
|
|
@property(nonatomic, readonly) NSDictionary *parameter_names;
|
2012-08-16 20:44:33 +00:00
|
|
|
@property(nonatomic, assign) KRContext *context;
|
2012-08-15 21:26:06 +00:00
|
|
|
@property(nonatomic, retain) NSString *debug_text;
|
2013-03-22 18:16:44 -07:00
|
|
|
@property(nonatomic, assign, readonly) KRRenderSettings *settings;
|
2012-04-12 19:43:08 +00:00
|
|
|
|
2012-10-17 19:43:15 +00:00
|
|
|
- (id)init;
|
2011-10-25 05:03:10 +00:00
|
|
|
- (BOOL)loadResource:(NSString *)path;
|
|
|
|
|
|
|
|
|
|
// Parameter enumeration interface
|
|
|
|
|
-(int)getParameterCount;
|
|
|
|
|
-(NSString *)getParameterNameWithIndex: (int)i;
|
|
|
|
|
-(NSString *)getParameterLabelWithIndex: (int)i;
|
|
|
|
|
-(KREngineParameterType)getParameterTypeWithIndex: (int)i;
|
2012-10-20 02:15:48 +00:00
|
|
|
-(float)getParameterMinWithIndex: (int)i;
|
|
|
|
|
-(float)getParameterMaxWithIndex: (int)i;
|
|
|
|
|
-(float)getParameterValueWithIndex: (int)i;
|
|
|
|
|
-(void)setParameterValueWithIndex: (int)i Value: (float)v;
|
|
|
|
|
-(void)setParameterValueWithName: (NSString *)name Value: (float)v;
|
2012-08-23 22:43:26 +00:00
|
|
|
-(int)getParameterIndexWithName: (NSString *)name;
|
2011-10-25 05:03:10 +00:00
|
|
|
|
2013-02-08 17:28:17 -08:00
|
|
|
- (void)renderScene: (KRScene *)pScene WithDeltaTime: (float)deltaTime AndWidth: (int)width AndHeight: (int)height;
|
2012-12-28 03:20:06 +00:00
|
|
|
- (void)renderScene: (KRScene *)pScene WithDeltaTime: (float)deltaTime;
|
2012-10-20 02:15:48 +00:00
|
|
|
- (void)setNearZ: (float)dNearZ;
|
|
|
|
|
- (void)setFarZ: (float)dFarZ;
|
2011-10-25 05:03:10 +00:00
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
2013-03-07 18:22:14 -08:00
|
|
|
#endif
|
|
|
|
|
|