Hierarchical Edge Bundle 1.0
|
00001 #pragma once 00002 #include "common.h" 00003 #include "glm/glm.hpp" 00004 00005 using glm::vec3; 00006 using glm::vec4; 00007 using glm::mat4; 00008 00015 class Light 00016 { 00017 public: 00021 enum LightType 00022 { 00023 LT_POINT = 0, 00024 LT_CONIC = 1, 00025 LT_SPOTLIGHT = 2, 00026 LT_NONE 00027 }; 00028 00029 public: 00033 Light(void); 00037 ~Light(void); 00038 00042 void On(); 00046 void Off(); 00050 bool IsOn(); 00051 00055 void ShadowOn(); 00059 void ShadowOff(); 00064 bool IsShadowOn(); 00065 00075 void SetShadowElements(int elements); 00080 bool AreVerticesInShadow(); 00085 bool AreGridsInShadow(); 00090 bool AreHierarchyEdgeInShadow(); 00095 bool AreRelationEdgeInShadow(); 00096 00101 void SetType(int type); 00106 void SetPosition(vec3 position); 00111 void SetSpotDirection(vec3 spotdirection); 00116 void SetRadius(float radius); 00121 void SetAttentuate(float attentuate); 00122 00127 float GetType(); 00132 vec3 GetPosition(); 00137 vec3 GetSpotDirection(); 00142 float GetRadius(); 00147 float GetAttentuate(); 00148 00149 private: 00150 bool m_shadowon; 00151 bool m_on; 00152 int m_actType; 00153 vec3 m_position; 00154 vec3 m_spotdirection; 00155 float m_radius; 00156 float m_attentuate; 00157 00158 bool m_shadowvertices; 00159 bool m_shadowhierarchyedge; 00160 bool m_shadowrelationedge; 00161 bool m_shadowgrid; 00162 00163 };