AnimatLab  2
Test
OsgLight.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace OsgAnimatSim
10 {
11 
17  namespace Environment
18  {
25  class ANIMAT_OSG_PORT OsgLight : public AnimatSim::Environment::Light, public OsgMovableItem
26  {
27  protected:
29 
30  osg::ref_ptr<osg::Light> m_osgLight;
31  osg::ref_ptr<osg::LightSource> m_osgLightSource;
32 
33  virtual void SetThisPointers();
34  virtual void CreateGraphicsGeometry();
35 
36  virtual void SetupLighting();
37  virtual void SetAttenuation();
38  virtual int GetGlLight();
39 
40  public:
41  OsgLight();
42  virtual ~OsgLight();
43 
44  virtual void Enabled(bool bVal);
45 
46  virtual void Position(CStdFPoint &oPoint, bool bUseScaling = true, bool bFireChangeEvent = false, bool bUpdateMatrix = true);
47  virtual void Ambient(CStdColor &aryColor);
48  virtual void Diffuse(CStdColor &aryColor);
49  virtual void Specular(CStdColor &aryColor);
50 
51  virtual osg::MatrixTransform *ParentOSG();
52 
53  virtual void SetupGraphics();
54  virtual void DeleteGraphics();
55  virtual void SetupPhysics() {};
56  virtual void DeletePhysics(bool bIncludeChildren) {};
57 
58  virtual void Create();
59  virtual void ResetSimulation();
60  virtual void Physics_Resize();
61  virtual void Physics_SetColor();
62  };
63 
64  } // Environment
65 } //OsgAnimatSim
Base class for the light object.
Definition: Light.h:23
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
Vortex physical structure implementation.
Definition: OsgLight.h:25