Jive reference manual
List of all members | Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions
jem::gl::Lights Class Reference

#include <jem/gl/Lights.h>

Inheritance diagram for jem::gl::Lights:
Inheritance graph

Public Types

enum  LightID {
  LIGHT0 = 0,
  LIGHT1,
  LIGHT2,
  LIGHT3
}
 
enum  CoordSystem {
  EYE_COORDS,
  OBJECT_COORDS
}
 

Public Member Functions

 Lights (const String &name="lights", CoordSystem coords=EYE_COORDS)
 
virtual bool takeGLAction (GfxContext &gtx, int action, const Properties &params)
 
virtual void getVisibility (bool &viz, Box &vbox, const Transform &proj) const
 
virtual void configure (const Properties &props)
 
virtual void getConfig (const Properties &props) const
 
virtual void listProps (const Properties &props) const
 
void enable (int idx, bool choice=true)
 
bool isEnabled (int idx) const
 
void setColor (int idx, const Color &color)
 
Color getColor (int idx) const
 
void setDirection (int idx, const Vertex3f &dir)
 
Vertex3f getDirection (int idx) const
 
void setAmbient (const Color &color)
 
Color getAmbient () const
 
void setSpecular (bool choice=true)
 
bool getSpecular () const
 
- Public Member Functions inherited from jem::gl::GfxNode
 GfxNode (const String &name="")
 
virtual String getContext () const
 
virtual GfxNodefindNode (const String &name) const
 
virtual bool takeAction (const String &action, const Properties &params)
 
virtual bool takeNRAction (const String &action, const Properties &params)
 
virtual void getBBox (Box &box) const
 
GfxNodegetParent () const
 
void setParent (GfxNode *parent)
 
void clearParent ()
 
- Public Member Functions inherited from jem::NamedObject
 NamedObject (const String &name="")
 
virtual String toString () const
 Returns a short textual description of this object. More...
 
String getName () const
 
- Public Member Functions inherited from jem::Object
virtual ClassgetClass () const
 Returns the Class instance representing the runtime class of this object. More...
 
virtual long hashValue () const
 Returns a hash value for this object. More...
 
virtual bool equals (const Ref< Object > &obj) const
 Tests whether two objects are equal. More...
 
Ref< Objectclone () const
 Returns a copy of this object. More...
 

Static Public Attributes

static const int MAX_LIGHTS = 4
 

Protected Member Functions

virtual ~Lights ()
 
- Protected Member Functions inherited from jem::gl::GfxNode
virtual ~GfxNode ()
 
- Protected Member Functions inherited from jem::NamedObject
virtual ~NamedObject ()
 
- Protected Member Functions inherited from jem::Collectable
 Collectable ()
 Creates an empty Collectable. More...
 
 ~Collectable ()
 Frees resources. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from jem::NamedObject
static String makeContext (const String &kind, const String &name)
 
- Static Public Member Functions inherited from jem::Object
static ClassgetType ()
 Returns the Class instance representing the Object class. More...
 
- Protected Attributes inherited from jem::NamedObject
String myName_
 

Member Enumeration Documentation

Enumerator
LIGHT0 
LIGHT1 
LIGHT2 
LIGHT3 
Enumerator
EYE_COORDS 
OBJECT_COORDS 

Constructor & Destructor Documentation

jem::gl::Lights::Lights ( const String name = "lights",
CoordSystem  coords = EYE_COORDS 
)
explicit
virtual jem::gl::Lights::~Lights ( )
protectedvirtual

Member Function Documentation

virtual bool jem::gl::Lights::takeGLAction ( GfxContext gtx,
int  action,
const Properties params 
)
virtual

Implements jem::gl::GfxNode.

virtual void jem::gl::Lights::getVisibility ( bool &  viz,
Box vbox,
const Transform proj 
) const
virtual

Reimplemented from jem::gl::GfxNode.

virtual void jem::gl::Lights::configure ( const Properties props)
virtual

Reimplemented from jem::gl::GfxNode.

virtual void jem::gl::Lights::getConfig ( const Properties props) const
virtual

Reimplemented from jem::gl::GfxNode.

virtual void jem::gl::Lights::listProps ( const Properties props) const
virtual

Reimplemented from jem::gl::GfxNode.

void jem::gl::Lights::enable ( int  idx,
bool  choice = true 
)
bool jem::gl::Lights::isEnabled ( int  idx) const
void jem::gl::Lights::setColor ( int  idx,
const Color color 
)
Color jem::gl::Lights::getColor ( int  idx) const
void jem::gl::Lights::setDirection ( int  idx,
const Vertex3f dir 
)
Vertex3f jem::gl::Lights::getDirection ( int  idx) const
void jem::gl::Lights::setAmbient ( const Color color)
Color jem::gl::Lights::getAmbient ( ) const
void jem::gl::Lights::setSpecular ( bool  choice = true)
bool jem::gl::Lights::getSpecular ( ) const

Member Data Documentation

const int jem::gl::Lights::MAX_LIGHTS = 4
static