SuperTuxKart
Public Member Functions | Private Attributes | List of all members
HeadlightObject Class Reference

A class to store the headlights of a kart. More...

#include <kart_model.hpp>

Public Member Functions

 HeadlightObject (const std::string &filename, const core::matrix4 &location, const std::string &bone_name, const video::SColor &color)
 
const std::string & getFilename () const
 
void setModel (scene::IMesh *mesh)
 Sets the mesh for this headlight object. More...
 
void setLight (scene::ISceneNode *parent, float energy, float radius)
 Add a light node emitted from the center mass the headlight.
 
const scene::ISceneNode * getLightNode () const
 
scene::ISceneNode * getLightNode ()
 
const scene::IMesh * getModel () const
 
scene::IMesh * getModel ()
 
const core::matrix4 & getLocation () const
 
const std::string & getBoneName () const
 

Private Attributes

std::string m_filename
 The filename of the headlight model. More...
 
core::matrix4 m_location
 The relative matrix to the parent kart scene node where the headlight mesh is attached to. More...
 
scene::IMesh * m_model
 The mesh for the headlight. More...
 
scene::ISceneNode * m_node
 The scene node of the headlight (real light). More...
 
video::SColor m_headlight_color
 The color of the real light. More...
 
std::string m_bone_name
 Attach to which bone in kart model if not empty. More...
 

Detailed Description

A class to store the headlights of a kart.

Member Function Documentation

◆ setModel()

void HeadlightObject::setModel ( scene::IMesh *  mesh)
inline

Sets the mesh for this headlight object.

Member Data Documentation

◆ m_bone_name

std::string HeadlightObject::m_bone_name
private

Attach to which bone in kart model if not empty.

◆ m_filename

std::string HeadlightObject::m_filename
private

The filename of the headlight model.

◆ m_headlight_color

video::SColor HeadlightObject::m_headlight_color
private

The color of the real light.

◆ m_location

core::matrix4 HeadlightObject::m_location
private

The relative matrix to the parent kart scene node where the headlight mesh is attached to.

◆ m_model

scene::IMesh* HeadlightObject::m_model
private

The mesh for the headlight.

◆ m_node

scene::ISceneNode* HeadlightObject::m_node
private

The scene node of the headlight (real light).


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