Visual Servoing Platform version 3.7.0
Loading...
Searching...
No Matches

#include <vpPanda3DLight.h>

Inheritance diagram for vpPanda3DLight:

Public Member Functions

 vpPanda3DLight (const std::string &name, const vpRGBf &color)
virtual ~vpPanda3DLight ()=default
const std::string & getName () const
const vpRGBfgetColor () const
virtual void addToScene (NodePath &scene) const =0

Protected Attributes

std::string m_name
vpRGBf m_color

Detailed Description

Base class for a Light that can be added to a Panda3D scene.

Note that modifying any object that inherits from this class after the method addToScene has been called * will not update the rendered light.

See also
https://docs.panda3d.org/1.10/cpp/programming/render-attributes/lighting

Tutorials & Examples

Tutorials
If you are interested in using Panda3D in Augmented Reality applications, you may have a look at:

Definition at line 68 of file vpPanda3DLight.h.

Constructor & Destructor Documentation

◆ vpPanda3DLight()

vpPanda3DLight::vpPanda3DLight ( const std::string & name,
const vpRGBf & color )
inline

Build a new Panda3D light, given a unique name and an RGB color.

Parameters
namethe name of the light: should be unique in the scene where the light will be added.
colorThe color of the light: Each R,G,B component is unbounded and can exceed a value of 1 to increase its intensity.

Definition at line 78 of file vpPanda3DLight.h.

References m_color, and m_name.

Referenced by vpPanda3DAmbientLight::vpPanda3DAmbientLight(), vpPanda3DDirectionalLight::vpPanda3DDirectionalLight(), and vpPanda3DPointLight::vpPanda3DPointLight().

◆ ~vpPanda3DLight()

virtual vpPanda3DLight::~vpPanda3DLight ( )
virtualdefault

Member Function Documentation

◆ addToScene()

virtual void vpPanda3DLight::addToScene ( NodePath & scene) const
pure virtual

Add the light to the scene.

Parameters
sceneScene where the light should be added.

Implemented in vpPanda3DAmbientLight, vpPanda3DDirectionalLight, and vpPanda3DPointLight.

◆ getColor()

const vpRGBf & vpPanda3DLight::getColor ( ) const
inline

Get the light's color.

Returns
const vpRGBf&

Definition at line 93 of file vpPanda3DLight.h.

References m_color.

◆ getName()

const std::string & vpPanda3DLight::getName ( ) const
inline

Get the name of the light.

This name should be unique and will be required when interacting with Panda3D to fetch the node.

Definition at line 87 of file vpPanda3DLight.h.

References m_name.

Member Data Documentation

◆ m_color

vpRGBf vpPanda3DLight::m_color
protected

Name of the light. Should be unique in the scene.

Definition at line 104 of file vpPanda3DLight.h.

Referenced by vpPanda3DAmbientLight::addToScene(), vpPanda3DDirectionalLight::addToScene(), vpPanda3DPointLight::addToScene(), getColor(), and vpPanda3DLight().

◆ m_name

std::string vpPanda3DLight::m_name
protected