Sceneview
 All Classes Functions Variables Enumerations Enumerator Groups Pages
Public Member Functions | Friends | List of all members
sv::LightNode Class Reference

A light in a scene graph used by some shaders to calculate lighting effects. More...

#include <sceneview/light_node.hpp>

Inheritance diagram for sv::LightNode:
sv::SceneNode

Public Member Functions

SceneNodeType NodeType () const override
 Retrieve the node type.
 
void SetLightType (LightType light_type)
 Sets the light type.
 
LightType GetLightType () const
 
void SetDirection (const QVector3D &dir)
 
const QVector3D & Direction () const
 Sets the light direction. More...
 
float Ambient () const
 
void SetAmbient (const float ambient)
 Sets the ambient coefficient for this light.
 
float Specular () const
 
void SetSpecular (const float specular)
 Sets the specular coefficient for this light.
 
const QVector3D & Color () const
 
void SetColor (const QVector3D &color)
 
void SetAttenuation (const float val)
 Sets the attenuation factor. More...
 
float Attenuation () const
 
void SetConeAngle (float cone_angle_deg)
 Sets the light cone angle (in degrees). More...
 
float ConeAngle () const
 Retrieve the cone angle, in degrees.
 
void SetScale (const QVector3D &vec) override
 Disabled for this class.
 
const AxisAlignedBoxWorldBoundingBox () override
 Retrieve the world-space bounding box of the node and all of its children (if applicable). More...
 
- Public Member Functions inherited from sv::SceneNode
 SceneNode (const SceneNode &)=delete
 
SceneNodeoperator= (const SceneNode &)=delete
 
const QString Name () const
 Retrieve the node name.
 
const QVector3D & Translation () const
 Retrieve the translation component of the node to parent transform.
 
const QQuaternion & Rotation () const
 Retrieve the rotation component of the node to parent transform.
 
const QVector3D & Scale () const
 Retrieve the scale component of the node to parent transform.
 
const QMatrix4x4 & WorldTransform ()
 Retrieve the transform from node coordinates to world coordinates. More...
 
bool Visible () const
 Check if the node is visible or not.
 
virtual void SetTranslation (const QVector3D &vec)
 Sets the translation component of the node transform.
 
void SetTranslation (double x, double y, double z)
 Sets the translation component of the node transform.
 
virtual void SetRotation (const QQuaternion &quat)
 Sets the rotation component of the node to parent transform.
 
void SetScale (double x, double y, double z)
 Sets the scale component of the node to parent transform.
 
virtual void SetVisible (bool visible)
 Sets the node visibility. More...
 
GroupNodeParentNode ()
 Retrieve the parent of this node.
 
void SetParentNode (GroupNode *parent)
 Sets the node's parent. More...
 
void SetSelectionMask (int64_t mask)
 Sets the selection mask for this node. More...
 
int64_t GetSelectionMask () const
 Retrieve the selection mask for this node.
 

Friends

class Scene
 

Additional Inherited Members

- Protected Member Functions inherited from sv::SceneNode
 SceneNode (const QString &name)
 Constructs a scene node with an identity transform.
 
virtual void TransformChanged ()
 Internal method, used to enable lazy matrix computations. More...
 
virtual void BoundingBoxChanged ()
 Internal method, used to enable lazy bounding box computations. More...
 

Detailed Description

A light in a scene graph used by some shaders to calculate lighting effects.

This class cannot be directly instantiated. Instead, use Scene.

Member Function Documentation

const QVector3D& sv::LightNode::Direction ( ) const
inline

Sets the light direction.

Only useful for directional and spot lights.

void sv::LightNode::SetAttenuation ( const float  val)
inline

Sets the attenuation factor.

Only useful for point and spot lights.

void sv::LightNode::SetConeAngle ( float  cone_angle_deg)
inline

Sets the light cone angle (in degrees).

Only useful for spot lights.

const AxisAlignedBox& sv::LightNode::WorldBoundingBox ( )
overridevirtual

Retrieve the world-space bounding box of the node and all of its children (if applicable).

Used internally in view frustum culling and selection queries.

Implements sv::SceneNode.


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