Couch
Public Member Functions | List of all members
PointLight Class Reference

#include <Light.h>

Inheritance diagram for PointLight:
Inheritance graph
[legend]
Collaboration diagram for PointLight:
Collaboration graph
[legend]

Public Member Functions

 PointLight (float radius, Vector3 color, float ambient, float diffuse, float specular)
 
float GetRadius ()
 
void SetRadius (float radius)
 
virtual Name GetType () const
 
virtual PointLightCreate ()
 
virtual PointLightDuplicate ()
 
virtual PointLightInstance ()
 
- Public Member Functions inherited from Light
Vector3 GetColor ()
 
void SetColor (Vector3 color)
 
float GetAmbient ()
 
void SetAmbient (float ambient)
 
float GetDiffuse ()
 
void SetDiffuse (float diffuse)
 
float GetSpecular ()
 
void SetSpecular (float specular)
 
- 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)
 
NodeGetParent ()
 
void QueueFree ()
 
void DoFree ()
 

Additional Inherited Members

- Static Public Member Functions inherited from Node
static NodeGetRoot ()
 
- Protected Attributes inherited from Light
Vector3 color
 
float ambient
 
float diffuse
 
float specular
 

Detailed Description

Point lights are omnidirectional lights that have a limited range.

Member Function Documentation

◆ Create()

PointLight * PointLight::Create ( )
virtual

Allocates a new "default" version of this node.

Returns
A reference to the node.

Reimplemented from Light.

◆ Duplicate()

PointLight * PointLight::Duplicate ( )
virtual

Copies the properties of this node to a newly allocated node, created via Create. Subclasses should override this to copy additional class attributes

Returns
A reference to the duplicate

Reimplemented from Light.

◆ GetRadius()

float PointLight::GetRadius ( )

The radius of which the light will shine.

Returns
The light radius.

◆ Instance()

PointLight * PointLight::Instance ( )
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.

Returns
an instanced version of this node.

Reimplemented from Light.

◆ SetRadius()

void PointLight::SetRadius ( float  radius)

Sets the light radius.

Parameters
radiusThe desired radius

The documentation for this class was generated from the following files: