Files
kraken/KREngine/KREngine/Classes/KRLight.h
kearwood 5768902ee2 Implemented notification system needed for occlusion culling and transparency sorting
--HG--
extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4072
2012-08-17 01:04:49 +00:00

56 lines
1.4 KiB
Objective-C

//
// KRLight.h
// KREngine
//
// Created by Kearwood Gilbert on 12-04-05.
// Copyright (c) 2012 Kearwood Software. All rights reserved.
//
#ifndef KREngine_KRLight_h
#define KREngine_KRLight_h
#import "KRResource.h"
#import "KRNode.h"
#import "KRTexture.h"
static const float KRLIGHT_MIN_INFLUENCE = 0.15f; // 0.05f
class KRLight : public KRNode {
public:
virtual ~KRLight();
virtual std::string getElementName() = 0;
virtual tinyxml2::XMLElement *saveXML( tinyxml2::XMLNode *parent);
virtual void loadXML(tinyxml2::XMLElement *e);
void setIntensity(float intensity);
float getIntensity();
void setDecayStart(float decayStart);
float getDecayStart();
const KRVector3 &getColor();
void setColor(const KRVector3 &color);
void setFlareTexture(std::string flare_texture);
void setFlareSize(float flare_size);
#if TARGET_OS_IPHONE
virtual void render(KRCamera *pCamera, KRContext *pContext, KRBoundingVolume &frustrumVolume, KRMat4 &viewMatrix, KRVector3 &cameraPosition, KRVector3 &lightDirection, KRMat4 *pShadowMatrices, GLuint *shadowDepthTextures, int cShadowBuffers, KRNode::RenderPass renderPass);
#endif
protected:
KRLight(KRContext &context, std::string name);
float m_intensity;
float m_decayStart;
KRVector3 m_color;
std::string m_flareTexture;
KRTexture *m_pFlareTexture;
float m_flareSize;
};
#endif