AGX Dynamics  2.35.0.1
Lights.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXGL_LIGHTS_H
18 #define AGXGL_LIGHTS_H
19 
20 #include <agx/agxPhysics_export.h>
21 #include <agx/Object.h>
22 #include <agx/Vec3.h>
23 #include <agx/Clock.h>
24 
25 namespace agxGL
26 {
31  {
32  public:
34 
35  static Lights* load(agx::TiXmlElement* eLights, agx::Device* device);
36  virtual void configure(agx::TiXmlElement* eLights) override;
37 
38  public:
39 
40  Lights(const agx::Name& name = "lights");
41 
42  bool setLightPosition(agx::UInt index, const agx::Vec4& position);
43 
44  bool setLightDirection(agx::UInt index, const agx::Vec3& direction);
45 
46  protected:
47  virtual ~Lights();
48 
49  protected:
52  };
53 
55 }
56 
57 #endif /*AGXGL_LIGHTS_H*/
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXPHYSICS_EXPORT
Container class for lights that is used for synchronizing light data with shaders,...
Definition: Lights.h:31
bool setLightDirection(agx::UInt index, const agx::Vec3 &direction)
static Lights * load(agx::TiXmlElement *eLights, agx::Device *device)
static agx::Model * ClassModel()
virtual void configure(agx::TiXmlElement *eLights) override
agx::Vector< agxData::ValueRefT< agx::Vec4 > > m_light_pos
Definition: Lights.h:50
agx::Vector< agxData::ValueRefT< agx::Vec3 > > m_light_dir
Definition: Lights.h:51
bool setLightPosition(agx::UInt index, const agx::Vec4 &position)
Lights(const agx::Name &name="lights")
virtual ~Lights()
A component is an object containing other objects, enabling hierarchical structuring.
Definition: Component.h:39
An agx::Device is an abstract representation of a device on which data can be stored and processed.
Definition: Device.h:58
A model is an abstract representation of the class of an agx::Object.
Definition: Model.h:41
Representation of a name string.
Definition: Name.h:33
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:35
Templated vector class.
Definition: agx/Vector.h:53
This namespace contains OpenGL specific details for connecting OpenCL/OpenGL.
uint32_t UInt
Definition: Integer.h:34