From 0e699be281c8dea53e589e08a5831837e0eae7ea Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 7 Oct 2021 20:17:50 -0400 Subject: Updates for Chickadee 0.8.0 and Guile-SDL2 0.7.0. --- manuals/chickadee/Lights.html | 212 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 212 insertions(+) create mode 100644 manuals/chickadee/Lights.html (limited to 'manuals/chickadee/Lights.html') diff --git a/manuals/chickadee/Lights.html b/manuals/chickadee/Lights.html new file mode 100644 index 0000000..1e6d234 --- /dev/null +++ b/manuals/chickadee/Lights.html @@ -0,0 +1,212 @@ + + + + + + +Lights (The Chickadee Game Toolkit) + + + + + + + + + + + + + + + + + + + +
+

+Next: , Previous: , Up: Graphics   [Contents][Index]

+
+
+

5.3.9 Lights

+ +

The (chickadee graphics light) module provides a data type for +dynamic lights that can be used to light 3D objects (such as +Models or Meshes.) +

+

There are 3 types of dynamic lights: +

+ + +
+
Procedure: make-point-light [#:position (vec3 0 0 0)] [#:color black] [#:intensity 1]
+
+

Return a new point light located at position that emits +color light. +

+ +
+
Procedure: make-directional-light [#:direction (vec3 0 -1 0)] [#:color black] [#:intensity 1]
+
+

Return a new directional light that emits color light in +direction. +

+ +
+
Procedure: make-spot-light [#:position (vec3 0 0 0)] [#:direction (vec3 0 -1 0)] [#:color black] [#:cut-off π/4] [#:intensity 1]
+
+

Return a new spot light located at position that emits +color light in direction in a cone that cuts off at +cut-off radians. +

+ +
+
Procedure: point-light? obj
+

Return #t if obj is a point light. +

+ +
+
Procedure: directional-light? obj
+

Return #t if obj is a directional light. +

+ +
+
Procedure: spot-light? obj
+

Return #t if obj is a spot light. +

+ +
+
Procedure: light-type light
+

Return the type of light, one of: +

+
    +
  • point +
  • directional +
  • spot +
+ +
+ +
+
Procedure: light-color light
+

Return the color of light. +

+ +
+
Procedure: light-intensity light
+

Return the intensity of light. +

+ +
+
Procedure: light-position light
+

Return the position of light. The value is irrelevant for +directional lights. +

+ +
+
Procedure: light-direction light
+

Return the direction of light. The value is irrelevant for +point lights. +

+ +
+
Procedure: light-cut-off light
+

Return the cosine of the cut off angle of light. The value is +only relevant for spot lights. +

+ +
+
Procedure: set-light-color! light color
+

Set the color of light to color. +

+ +
+
Procedure: set-light-position! light position
+

Set the position of light to position. +

+ +
+
Procedure: set-light-direction! light direction
+

Set the direction of light to direction. +

+ +
+
Procedure: set-light-cut-off! light cut-off
+

Set the cut off angle of light to cut-off. +

+ +
+
+

+Next: , Previous: , Up: Graphics   [Contents][Index]

+
+ + + + + -- cgit v1.2.3