Lights are now working correctly. Need to update the kernel to account for multiple lights, and add sfEventSubscriber to the LightHandler
This commit is contained in:
@@ -35,6 +35,7 @@ struct PackedData {
|
||||
position(position), direction_cartesian(direction_cartesian), rgbi(rgbi) {
|
||||
}
|
||||
PackedData() {};
|
||||
~PackedData() {};
|
||||
sf::Vector4f rgbi;
|
||||
sf::Vector3f position;
|
||||
sf::Vector3f direction_cartesian;
|
||||
@@ -50,7 +51,7 @@ public:
|
||||
LightController(std::shared_ptr<Hardware_Caster> raycaster);
|
||||
~LightController();
|
||||
|
||||
std::unique_ptr<LightHandle> create_light(LightPrototype light_prototype);
|
||||
std::shared_ptr<LightHandle> create_light(LightPrototype light_prototype);
|
||||
void remove_light(unsigned int light_index);
|
||||
|
||||
void recieve_event(VrEventPublisher* p, std::unique_ptr<vr::Event> event) override;
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
LightHandle(LightController *const light_controller, unsigned int light_id, LightPrototype light_prototype, std::unique_ptr<PackedData> data_reference);
|
||||
LightHandle(LightController *const light_controller, unsigned int light_id, LightPrototype light_prototype, PackedData *const data_reference);
|
||||
|
||||
// Reference to the LightController to handle deconstruction and removal using the light_id
|
||||
LightController *const light_controller_ref;
|
||||
@@ -67,5 +67,5 @@ private:
|
||||
sf::Vector3f movement;
|
||||
|
||||
// Reference to the packed data in the LightController
|
||||
std::unique_ptr<PackedData> data_reference;
|
||||
PackedData *const data_reference;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user