|
Couch
|
#include <Light.h>


Public Member Functions | |
| Vector3 | GetColor () |
| void | SetColor (Vector3 color) |
| float | GetAmbient () |
| void | SetAmbient (float ambient) |
| float | GetDiffuse () |
| void | SetDiffuse (float diffuse) |
| float | GetSpecular () |
| void | SetSpecular (float specular) |
| virtual Light * | Create () |
| virtual Light * | Duplicate () |
| virtual Light * | Instance () |
| virtual Name | GetType () const |
Public Member Functions inherited from Spatial | |
| Transform | GetTransform () |
| void | SetTransform (Transform transform) |
| Transform | GetGlobalTransform () |
| void | SetGlobalTransform (Transform globalTransform) |
| virtual void | Translate (Vector3 offset) |
| void | RotateX (float phi) |
| void | RotateY (float phi) |
| void | RotateZ (float phi) |
| void | UniformScale (float scale) |
Public Member Functions inherited from Node | |
| Node (bool isPrefab) | |
| bool | IsPrefab () |
| NodeList | GetChildren () |
| void | AddChild (Node *child) |
| Node * | GetParent () |
| void | QueueFree () |
| void | DoFree () |
Protected Attributes | |
| Vector3 | color |
| float | ambient |
| float | diffuse |
| float | specular |
Additional Inherited Members | |
Static Public Member Functions inherited from Node | |
| static Node * | GetRoot () |
All lights have color as well as ambient, diffuse, and specular properties. In the future, light properties might be a color, but for now they are strength modulations on the main light color.
|
virtual |
Allocates a new "default" version of this node.
Reimplemented from Spatial.
Reimplemented in PointLight, and DirectionalLight.
|
virtual |
Copies the properties of this node to a newly allocated node, created via Create. Subclasses should override this to copy additional class attributes
Reimplemented from Spatial.
Reimplemented in PointLight, and DirectionalLight.
| float Light::GetAmbient | ( | ) |
Ambient light is how much light is emitted from an object illuminated by this light with no accounting for incidence angle or the location of the observer.
| Vector3 Light::GetColor | ( | ) |
Get the color property of this light
| float Light::GetDiffuse | ( | ) |
Diffuse light is how much light is reflected by an object illuminated by this light, accounting for incidence angle of the light but not the location of the observer.
| float Light::GetSpecular | ( | ) |
Specular light is how much light is reflected by an object illuminated by this light, taking into account both the incidence angle of the light as well as the location of the observer. This is what creates the "Specular Artifact", the shiny bit on a 3D sphere.
|
virtual |
Creates an instanced version of this node, by calling Duplicate. Subclasses should override this to perform neccesary tasks for instantiation, i.e. adding a physic object to the physics world. Any children of this node will also be instanced.
Reimplemented from Spatial.
Reimplemented in PointLight, and DirectionalLight.
| void Light::SetAmbient | ( | float | ambient | ) |
Set the ambient light intensity.
| ambient | The desired ambient intensity for this light. |
| void Light::SetColor | ( | Vector3 | color | ) |
Set the color property of this light
| color | The desired color. |
| void Light::SetDiffuse | ( | float | diffuse | ) |
Set the diffuse intensity.
| diffuse | The desired diffuse intensity for this light |
| void Light::SetSpecular | ( | float | specular | ) |
Set the specular intensity.
| specular | The desired specular intensity for this light. |