SuperTuxKart
Public Member Functions | Static 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, HeadlightType headlight_type, float radius, float energy, float inner_cone, float outer_cone)
 
const std::string & getFilename () const
 
void setModel (scene::IMesh *mesh)
 Sets the mesh for this headlight object.
 
void setLight (scene::ISceneNode *parent)
 Add a light node emitted from the center mass the headlight.
 
void setLightNode (scene::ISceneNode *node)
 
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
 
HeadlightType getHeadlightType () const
 
void setRadius (float radius)
 
void setEnergy (float energy)
 
void setDefaultConeValues (unsigned light_count)
 
bool useDefaultSettings () const
 

Static Public Member Functions

static HeadlightType getHeadlightTypeFromString (const std::string &s)
 

Private Attributes

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

Detailed Description

A class to store the headlights of a kart.


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