Visual Servoing Platform  version 3.6.1 under development (2024-11-21)
vpPanda3DDirectionalLight Class Reference

#include <visp3/ar/vpPanda3DLight.h>

+ Inheritance diagram for vpPanda3DDirectionalLight:

Public Member Functions

 vpPanda3DDirectionalLight (const std::string &name, const vpRGBf &color, const vpColVector &direction)
 
void addToScene (NodePath &scene) const VP_OVERRIDE
 
const std::string & getName () const
 
const vpRGBfgetColor () const
 

Protected Attributes

std::string m_name
 
vpRGBf m_color
 

Detailed Description

Class representing a directional light.

A directional light has no origin nor falloff.

Examples
tutorial-panda3d-renderer.cpp.

Definition at line 186 of file vpPanda3DLight.h.

Constructor & Destructor Documentation

◆ vpPanda3DDirectionalLight()

vpPanda3DDirectionalLight::vpPanda3DDirectionalLight ( const std::string &  name,
const vpRGBf color,
const vpColVector direction 
)
inline

Build a new directional light.

See also
vpPanda3DLight constructor.
Parameters
namename of the light
colorcolor of the light
directionPosition in the scene of the light. Uses ViSP coordinates.

Definition at line 198 of file vpPanda3DLight.h.

References vpException::dimensionError.

Member Function Documentation

◆ addToScene()

void vpPanda3DDirectionalLight::addToScene ( NodePath &  scene) const
inlinevirtual

Add the light to the scene.

Parameters
sceneScene where the light should be added.

Implements vpPanda3DLight.

Definition at line 207 of file vpPanda3DLight.h.

References vpPanda3DBaseRenderer::vispVectorToPanda().

◆ getColor()

const vpRGBf& vpPanda3DLight::getColor ( ) const
inlineinherited

Get the light's color.

Returns
const vpRGBf&

Definition at line 84 of file vpPanda3DLight.h.

◆ getName()

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

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
protectedinherited

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
protectedinherited

Definition at line 94 of file vpPanda3DLight.h.