Main Page
Namespaces
Classes
Files
File List
File Members
include
Graphics
GtePointLightEffect.h
Go to the documentation of this file.
1
// David Eberly, Geometric Tools, Redmond WA 98052
2
// Copyright (c) 1998-2017
3
// Distributed under the Boost Software License, Version 1.0.
4
// http://www.boost.org/LICENSE_1_0.txt
5
// http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6
// File Version: 3.0.0 (2016/06/19)
7
8
#pragma once
9
10
#include <
Graphics/GteLightingEffect.h
>
11
12
namespace
gte
13
{
14
15
class
GTE_IMPEXP
PointLightEffect
:
public
LightingEffect
16
{
17
public
:
18
// Construction. Set 'select' to 0 for per-vertex effects or to 1 for per-pixel effects.
19
PointLightEffect
(std::shared_ptr<ProgramFactory>
const
& factory,
20
BufferUpdater
const
& updater,
int
select, std::shared_ptr<Material>
const
& material,
21
std::shared_ptr<Lighting>
const
& lighting, std::shared_ptr<LightCameraGeometry>
const
& geometry);
22
23
// After you set or modify 'material', 'light', or 'geometry', call the update
24
// to inform any listener that the corresponding constant buffer has changed.
25
virtual
void
UpdateMaterialConstant();
26
virtual
void
UpdateLightingConstant();
27
virtual
void
UpdateGeometryConstant();
28
29
private
:
30
struct
InternalMaterial
31
{
32
Vector4<float>
emissive
;
33
Vector4<float>
ambient
;
34
Vector4<float>
diffuse
;
35
Vector4<float>
specular
;
36
};
37
38
struct
InternalLighting
39
{
40
Vector4<float>
ambient
;
41
Vector4<float>
diffuse
;
42
Vector4<float>
specular
;
43
Vector4<float>
attenuation
;
44
};
45
46
struct
InternalGeometry
47
{
48
Vector4<float>
lightModelPosition
;
49
Vector4<float>
cameraModelPosition
;
50
};
51
52
// Shader source code as strings.
53
static
std::string
const
msGLSLVSSource[2];
54
static
std::string
const
msGLSLPSSource[2];
55
static
std::string
const
msHLSLSource[2];
56
static
std::string
const
* msVSSource[2][
ProgramFactory::PF_NUM_API
];
57
static
std::string
const
* msPSSource[2][
ProgramFactory::PF_NUM_API
];
58
};
59
60
}
gte::PointLightEffect::InternalLighting::ambient
Vector4< float > ambient
Definition:
GtePointLightEffect.h:40
gte::LightingEffect
Definition:
GteLightingEffect.h:18
gte::PointLightEffect::InternalLighting
Definition:
GtePointLightEffect.h:38
gte::PointLightEffect::InternalGeometry::cameraModelPosition
Vector4< float > cameraModelPosition
Definition:
GtePointLightEffect.h:49
gte::BufferUpdater
std::function< void(std::shared_ptr< Buffer > const &)> BufferUpdater
Definition:
GteBuffer.h:24
gte::PointLightEffect::InternalMaterial
Definition:
GtePointLightEffect.h:30
gte::PointLightEffect::InternalMaterial::diffuse
Vector4< float > diffuse
Definition:
GtePointLightEffect.h:34
gte::PointLightEffect::InternalMaterial::emissive
Vector4< float > emissive
Definition:
GtePointLightEffect.h:32
string
GLsizei const GLchar *const * string
Definition:
glcorearb.h:809
gte::PointLightEffect::InternalLighting::diffuse
Vector4< float > diffuse
Definition:
GtePointLightEffect.h:41
gte
Definition:
GLX/GteWICFileIO.h:16
gte::PointLightEffect
Definition:
GtePointLightEffect.h:15
gte::Vector< 4, Real >
gte::ProgramFactory::PF_NUM_API
Definition:
GteProgramFactory.h:40
gte::PointLightEffect::InternalLighting::specular
Vector4< float > specular
Definition:
GtePointLightEffect.h:42
gte::PointLightEffect::InternalMaterial::ambient
Vector4< float > ambient
Definition:
GtePointLightEffect.h:33
gte::PointLightEffect::InternalGeometry::lightModelPosition
Vector4< float > lightModelPosition
Definition:
GtePointLightEffect.h:48
gte::PointLightEffect::InternalLighting::attenuation
Vector4< float > attenuation
Definition:
GtePointLightEffect.h:43
gte::PointLightEffect::InternalMaterial::specular
Vector4< float > specular
Definition:
GtePointLightEffect.h:35
gte::PointLightEffect::InternalGeometry
Definition:
GtePointLightEffect.h:46
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
GteLightingEffect.h
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:01