Inviwo  0.9.10.1
Inviwo documentation
inviwo::PointLightInteractionHandler Class Reference
+ Inheritance diagram for inviwo::PointLightInteractionHandler:

Public Member Functions

 PointLightInteractionHandler (PositionProperty *, CameraProperty *, BoolProperty *, FloatVec2Property *)
 
virtual std::string getClassIdentifier () const override
 
const CameragetCamera ()
 
virtual void invokeEvent (Event *event) override
 
void setHandleEventsOptions (int)
 
void setLightPosFromScreenCoords (const vec2 &normalizedScreenCoord)
 Changes the direction of the light source, relative to the camera, such that it acts as if it comes from the direction where the user clicked on the screen. More...
 
void onCameraChanged ()
 
virtual const vec3 & getLookTo () const override
 
virtual const vec3 & getLookFrom () const override
 
virtual const vec3 & getLookUp () const override
 
virtual void setLookTo (vec3 lookTo) override
 
virtual void setLookFrom (vec3 lookFrom) override
 
virtual void setLookUp (vec3 lookUp) override
 
virtual vec3 getLookFromMinValue () const override
 
virtual vec3 getLookFromMaxValue () const override
 
virtual vec3 getLookToMinValue () const override
 
virtual vec3 getLookToMaxValue () const override
 
virtual void setLook (vec3 lookFrom, vec3 lookTo, vec3 lookUp) override
 
virtual float getNearPlaneDist () const override
 
virtual float getFarPlaneDist () const override
 
virtual vec3 getWorldPosFromNormalizedDeviceCoords (const vec3 &ndcCoords) const override
 
virtual vec3 getNormalizedDeviceFromNormalizedScreenAtFocusPointDepth (const vec2 &normalizedScreenCoord) const override
 
virtual void serialize (Serializer &s) const override
 
virtual void deserialize (Deserializer &d) override
 

Member Function Documentation

◆ setLightPosFromScreenCoords()

void inviwo::PointLightInteractionHandler::setLightPosFromScreenCoords ( const vec2 &  normalizedScreenCoord)

Changes the direction of the light source, relative to the camera, such that it acts as if it comes from the direction where the user clicked on the screen.

Intersects a sphere covering the scene and places the light source in the direction of the intersection point but at the same distance from the origin as before. If the intersection is outside the sphere the light source will be placed perpendicular to the camera at the same distance as before.

Parameters
normalizedScreenCoordCoordinates in [0 1], where y coordinate is 0 at top of screen.

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