Visual Servoing Platform  version 3.6.1 under development (2024-10-18)

#include <visp3/ar/vpPanda3DLight.h>

+ Inheritance diagram for vpPanda3DLight:

Public Member Functions

 vpPanda3DLight (const std::string &name, const vpRGBf &color)
 
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

Definition at line 61 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 71 of file vpPanda3DLight.h.

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 vpPanda3DDirectionalLight, vpPanda3DPointLight, and vpPanda3DAmbientLight.

◆ getColor()

const vpRGBf& vpPanda3DLight::getColor ( ) const
inline

Get the light's color.

Returns
const vpRGBf&

Definition at line 84 of file vpPanda3DLight.h.

◆ 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 78 of file vpPanda3DLight.h.

Member Data Documentation

◆ m_color

vpRGBf vpPanda3DLight::m_color
protected

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

Definition at line 95 of file vpPanda3DLight.h.

◆ m_name

std::string vpPanda3DLight::m_name
protected

Definition at line 94 of file vpPanda3DLight.h.