ShadowMapping.h
Go to the documentation of this file.
1 // This file is a part of the OpenSurgSim project.
2 // Copyright 2013, SimQuest Solutions Inc.
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 
16 #ifndef SURGSIM_BLOCKS_SHADOWMAPPING_H
17 #define SURGSIM_BLOCKS_SHADOWMAPPING_H
18 
19 #include <string>
20 #include <memory>
21 #include <array>
22 #include <vector>
23 
24 namespace SurgSim
25 {
26 
27 namespace Graphics
28 {
29 class OsgMaterial;
30 }
31 namespace Framework
32 {
33 class SceneElement;
34 class Component;
35 }
36 
37 
38 
39 namespace Blocks
40 {
41 
44 static const std::string GROUP_SHADOW_CASTER = "Shadowing";
45 static const std::string GROUP_SHADOW_RECEIVER = "Shadowed";
47 
66 std::vector<std::shared_ptr<Framework::SceneElement>> createShadowMapping(
67  std::shared_ptr<Framework::Component> camera,
68  std::shared_ptr<Framework::Component> light,
69  int depthTextureSize,
70  int shadowTextureSize,
71  std::array<double, 6> lightCameraProjection,
72  double bias,
73  double intensity,
74  bool useBlur,
75  double blurRadius,
76  bool showDebug);
77 
78 }
79 }
80 
81 #endif
SurgSim::Blocks::createShadowMapping
std::vector< std::shared_ptr< Framework::SceneElement > > createShadowMapping(std::shared_ptr< Framework::Component > camera, std::shared_ptr< Framework::Component > light, int depthTextureSize, int shadowTextureSize, std::array< double, 6 > lightCameraProjection, double bias, double intensity, bool useBlur, double blurRadius, bool showDebug)
Builds a series of SceneElements enabling the rendering of shadows, all graphics object that should c...
Definition: ShadowMapping.cpp:182
SurgSim
Definition: CompoundShapeToGraphics.cpp:29
string
string(TOUPPER ${DEVICE} DEVICE_UPPER_CASE) option(BUILD_DEVICE_$
Definition: CMakeLists.txt:38