SO3Engine
|
#include <SO3Light.h>
Public Types | |
enum | LightType { SO3_POINT_LIGHT = 0 , SO3_DIRECTIONAL_LIGHT = 1 , SO3_SPOT_LIGHT = 2 , SO3_RECT_LIGHT = 3 } |
Public Types inherited from SO3::SNode | |
enum | NodeType { NODE_TYPE_ID = 0 , ENTITY_TYPE_ID = 1 , CAMERA_TYPE_ID = 2 , LIGHT_TYPE_ID = 3 , SKELETON_TYPE_ID = 4 , BONE_TYPE_ID = 5 , PARTICLE_SYSTEM_TYPE_ID = 6 , DYNAMIC_CUBE_MAP_ID = 7 , DYNAMIC_REFLECTION_MAP_ID = 8 , RENDER_TO_TEXTURE_ID = 9 , LINE_ENTITY_TYPE_ID = 10 , VIRTUAL_POINTER_TYPE_ID = 11 } |
enum | NodeTransformSpace { SO3_LOCAL_TS = 0 , SO3_PARENT_TS = 1 , SO3_WORLD_TS = 2 } |
Public Member Functions | |
SLight (SScene *parent, const std::string &lightName) | |
~SLight () | |
Ogre::Light * | GetOgreLightPointer () |
void | SetVolumetric (bool state) |
bool | GetVolumetric () |
void | SetDiffuseColour (const int &diffuseColor) |
int | GetDiffuseColour () |
void | SetSpecularColour (const int &specularColor) |
void | SetDiffuseColour (Ogre::ColourValue color) |
void | SetSpecularColour (Ogre::ColourValue color) |
int | GetSpecularColour () |
void | SetPowerScale (const float &powerScale) |
float | GetPowerScale () |
void | SetVisible (const bool &isVisible) |
bool | GetVisible () |
void | SetAttenuation (const float &range, const float &constant, const float &linear, const float &quadratic) |
void | SetAttenuation (const float &range) |
Ogre::Vector4 | GetAttenuation () |
void | SetShadowFarDistance (const float &distance) |
void | UpdateShadowFarDistance (const float &distance) |
void | UpdateShadowFarClipDistance (const float &distance) |
float | GetShadowFarDistance () |
void | SetType (const LightType &type) |
LightType | GetType () |
void | SetSpotlightInnerAngle (const float &radianAngle) |
float | GetSpotlightInnerAngle () |
void | SetSpotlightOuterAngle (const float &radianAngle) |
float | GetSpotlightOuterAngle () |
void | SetSpotlightFalloff (const float &value) |
float | GetSpotlightFalloff () |
void | SetSourceSize (float x, float y) |
Ogre::Vector2f | GetSourceSize () |
virtual void | SetCastShadows (const bool &castShadows) |
virtual bool | GetCastShadows () |
virtual void | SetRenderingDistance (const float &distance) |
virtual float | GetRenderingDistance () |
virtual Ogre::Vector3 | GetBoundingBoxSize (const bool &childs=false) |
virtual Ogre::Vector3 | GetBoundingBoxCenter (const bool &childs=false) |
virtual Ogre::Vector3 | GetWorldBoundingBoxSize (const bool &childs=false) |
virtual Ogre::Vector3 | GetWorldBoundingBoxCenter (const bool &childs=false) |
Public Member Functions inherited from SO3::SNode | |
SNode (SScene *parent, const std::string &nodeName, const bool &isRootNode=false) | |
virtual | ~SNode () |
SScene * | GetParentScene () |
Ogre::SceneNode * | GetOgreSceneNodePointer () |
Ogre::MovableObject * | GetMovableObjectPointer () |
bool | GetSceneNodeIsMouseForeground () |
void | SetSceneNodeIsMouseForeground (const bool &mForeground) |
bool | GetSceneNodeIsMouseClick () |
void | SetSceneNodeIsMouseClick (const bool &mClickable) |
int | GetSceneNodeMouseFlags () |
void | SetSceneNodeMouseFlags (const int &flags) |
bool | GetSceneNodeHasBody () |
SBody * | GetSceneNodeBody () |
void | RestoreStaticGraph () |
void | SetAsStaticGeometry (const bool &state) |
bool | GetAsStaticGeometry () |
Ogre::StaticGeometry * | GetStaticGeometry () |
void | SetFlags (const int &flags) |
void | SetPhysicsOverride (bool state) |
bool | GetPhysicsOverride () |
int | GetFlags () |
void | UpdateNodeBody (const bool &bScale) |
void | DisableAutoTarget () |
NodeType | GetNodeType () |
void | AttachToParent (SNode *newParentNode) |
void | DetachFromParent () |
SNode * | GetParentSceneNode () |
const SNodeMap | GetChildrenNodes () const |
virtual int | GetNumChildren () |
void | DetachAllChildren () |
virtual Ogre::Matrix4 | GetTransformationMatrix () |
virtual Ogre::Vector3 | GetPosition () |
virtual void | SetPosition (const Ogre::Vector3 &pos) |
virtual Ogre::Quaternion | GetOrientation () |
virtual void | SetOrientation (const Ogre::Quaternion &quat) |
virtual void | AddOrientation (const Ogre::Quaternion &quat) |
virtual Ogre::Vector3 | GetScale () |
virtual void | SetScale (const Ogre::Vector3 &scale) |
virtual Ogre::Vector3 | GetGlobalPosition () |
virtual void | SetGlobalPosition (const Ogre::Vector3 &pos, bool updateBody=true) |
virtual Ogre::Quaternion | GetGlobalOrientation () |
virtual void | SetGlobalOrientation (const Ogre::Quaternion &quat, bool updateBody=true) |
virtual Ogre::Vector3 | GetGlobalScale () |
virtual void | SetGlobalScale (const Ogre::Vector3 &scale, bool updateBody=true) |
virtual void | StoreInitialPRS () |
virtual void | ResetToInitialPRS () |
void | ResetToInitialPosition () |
virtual void | ResetToInitialOrientation () |
void | ResetToInitialScale () |
virtual Ogre::Vector3 | GetInitialPosition () |
virtual Ogre::Quaternion | GetInitialOrientation () |
virtual Ogre::Vector3 | GetInitialScale () |
bool | GetShowBoundingBox () |
void | SetShowBoundingBox (const bool &showBounding) |
void | SetAutoTracking (const bool &autoTrack, SNode *targetNode=0, const Ogre::Vector3 &localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z, const Ogre::Vector3 &offset=Ogre::Vector3::ZERO) |
SNode * | GetAutoTrackingTarget () |
virtual void | Pitch (const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS) |
virtual void | Yaw (const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS) |
virtual void | Roll (const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS) |
virtual void | Rotate (const Ogre::Vector3 &axis, const float &radianAngle, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS) |
virtual void | Translate (const Ogre::Vector3 &d, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_PARENT_TS) |
void | SetDirection (const Ogre::Vector3 &vec, const SNode::NodeTransformSpace &relativeTo=SNode::SO3_LOCAL_TS, const Ogre::Vector3 &localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z) |
Ogre::Vector3 | GetDirection (bool derived=false, Ogre::Vector3 axis=Ogre::Vector3::NEGATIVE_UNIT_Z) |
void | LookAt (const Ogre::Vector3 &targetPoint, const SNode::NodeTransformSpace &relativeTo, const Ogre::Vector3 &localDirectionVector=Ogre::Vector3::NEGATIVE_UNIT_Z) |
bool | GetVisible () |
void | SetVisible (const bool &visible, const bool &cascade=true) |
SNodeAnimation * | CreateNodeAnimation (const std::string &animationName, const float &animationLength) |
void | DeleteAnimation (SAnim *existingAnimation) |
size_t | GetNumAnimations () |
SAnim * | GetAnimation (const std::string &animationName) |
SAnim * | GetAnimation (const unsigned short &animationIndex) |
SAnimMap | GetAnimations () const |
bool | IsAnimated () |
Ogre::Vector3 | GetPositionFromNode (SNode *nodeRef) |
Ogre::Quaternion | GetOrientationFromNode (SNode *nodeRef) |
Ogre::Vector3 | GetScaleFromNode (SNode *nodeRef) |
virtual void | SetInheritOrientation (const bool &state) |
virtual bool | GetInheritOrientation () |
virtual void | ResetOrientation () |
void | DeleteBody () |
SBody * | CreateBoxBody (const Ogre::Vector3 &boxsetting) |
SBody * | CreateBoxBody (const Ogre::Vector3 &boxsetting, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat) |
SBody * | CreateConeBody (const Ogre::Real &radius, const Ogre::Real &height) |
SBody * | CreateConeBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat) |
SBody * | CreateEllipsoidBody (const Ogre::Vector3 &size) |
SBody * | CreateEllipsoidBody (const Ogre::Vector3 &size, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat) |
SBody * | CreateCapsuleBody (const Ogre::Real &radius, const Ogre::Real &height) |
SBody * | CreateCapsuleBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat) |
SBody * | CreateCylinderBody (const Ogre::Real &radius, const Ogre::Real &height) |
SBody * | CreateCylinderBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat) |
SBody * | CreateChamferCylinderBody (const Ogre::Real &radius, const Ogre::Real &height) |
SBody * | CreateChamferCylinderBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat) |
SBody * | CreatePyramidBody (const Ogre::Vector3 &size) |
SBody * | CreatePyramidBody (const Ogre::Vector3 &size, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat) |
SBody * | CreateConvexHullBody (const Ogre::Real &tolerance) |
SBody * | CreateConcaveHullBody (const Ogre::Real &tolerance) |
SBody * | CreateTreeBody (const bool &optimize) |
bool | IsDirty () |
void | SetDirty (bool state) |
void | UpdateNodeFromBody () |
void | ResetNode () |
Public Member Functions inherited from SO3::SData | |
SData (const std::string &dataName) | |
virtual | ~SData () |
std::string | GetName () const |
SUserObjectBindings & | GetUserObjectBindings () |
const SUserObjectBindings & | GetUserObjectBindings () const |
Additional Inherited Members | |
Protected Member Functions inherited from SO3::SNode | |
SNode (SScene *parent, const std::string &nodeName, const NodeType &nodeType) | |
void | AddAnimation (SAnim *existingAnimation) |
void | RemoveAnimation (SAnim *existingAnimation) |
void | RemoveAnimation (const std::string &animationName) |
Ogre::Vector3 | GetSonsBoundingBox () |
Ogre::Vector3 | GetSonsWorldBoundingBox () |
Protected Attributes inherited from SO3::SNode | |
SScene * | currentScene |
Ogre::SceneNode * | O3SceneNode |
Ogre::MovableObject * | ogreMovableObject |
SBody * | nodeBody |
unsigned short | animationCounter |
Ogre::Vector3 | initialPosition |
Ogre::Quaternion | initialOrientation |
Ogre::Vector3 | initialScale |
Protected Attributes inherited from SO3::SData | |
std::string | name |
Detailed Description
Definition at line 43 of file SO3Light.h.
Member Enumeration Documentation
◆ LightType
Enumerator | |
---|---|
SO3_POINT_LIGHT | |
SO3_DIRECTIONAL_LIGHT | |
SO3_SPOT_LIGHT | |
SO3_RECT_LIGHT |
Definition at line 46 of file SO3Light.h.
Constructor & Destructor Documentation
◆ SLight()
SO3::SLight::SLight | ( | SScene * | parent, |
const std::string & | lightName | ||
) |
Constructor
Definition at line 15 of file SO3Light.cpp.
◆ ~SLight()
SO3::SLight::~SLight | ( | ) |
Definition at line 36 of file SO3Light.cpp.
Member Function Documentation
◆ GetAttenuation()
Ogre::Vector4 SO3::SLight::GetAttenuation | ( | ) |
Definition at line 187 of file SO3Light.cpp.
◆ GetBoundingBoxCenter()
|
virtual |
Reimplemented from SO3::SNode.
Definition at line 304 of file SO3Light.cpp.
◆ GetBoundingBoxSize()
|
virtual |
Reimplemented from SO3::SNode.
Definition at line 296 of file SO3Light.cpp.
◆ GetCastShadows()
|
virtual |
Reimplemented from SO3::SNode.
Definition at line 281 of file SO3Light.cpp.
◆ GetDiffuseColour()
int SO3::SLight::GetDiffuseColour | ( | ) |
Definition at line 122 of file SO3Light.cpp.
◆ GetOgreLightPointer()
Ogre::Light * SO3::SLight::GetOgreLightPointer | ( | ) |
Definition at line 45 of file SO3Light.cpp.
◆ GetPowerScale()
float SO3::SLight::GetPowerScale | ( | ) |
Definition at line 144 of file SO3Light.cpp.
◆ GetRenderingDistance()
|
virtual |
Reimplemented from SO3::SNode.
Definition at line 291 of file SO3Light.cpp.
◆ GetShadowFarDistance()
float SO3::SLight::GetShadowFarDistance | ( | ) |
Definition at line 213 of file SO3Light.cpp.
◆ GetSourceSize()
Ogre::Vector2f SO3::SLight::GetSourceSize | ( | ) |
Definition at line 267 of file SO3Light.cpp.
◆ GetSpecularColour()
int SO3::SLight::GetSpecularColour | ( | ) |
Definition at line 132 of file SO3Light.cpp.
◆ GetSpotlightFalloff()
float SO3::SLight::GetSpotlightFalloff | ( | ) |
Definition at line 256 of file SO3Light.cpp.
◆ GetSpotlightInnerAngle()
float SO3::SLight::GetSpotlightInnerAngle | ( | ) |
Definition at line 235 of file SO3Light.cpp.
◆ GetSpotlightOuterAngle()
float SO3::SLight::GetSpotlightOuterAngle | ( | ) |
Definition at line 246 of file SO3Light.cpp.
◆ GetType()
SLight::LightType SO3::SLight::GetType | ( | ) |
Definition at line 225 of file SO3Light.cpp.
◆ GetVisible()
bool SO3::SLight::GetVisible | ( | ) |
Definition at line 167 of file SO3Light.cpp.
◆ GetVolumetric()
bool SO3::SLight::GetVolumetric | ( | ) |
Definition at line 100 of file SO3Light.cpp.
◆ GetWorldBoundingBoxCenter()
|
virtual |
Reimplemented from SO3::SNode.
Definition at line 317 of file SO3Light.cpp.
◆ GetWorldBoundingBoxSize()
|
virtual |
Reimplemented from SO3::SNode.
Definition at line 309 of file SO3Light.cpp.
◆ SetAttenuation() [1/2]
void SO3::SLight::SetAttenuation | ( | const float & | range | ) |
Set attenuation parameters automatically, from the range value, and using the standart formula
- Remarks
- approximation is used, but it's good enought for most of the cases.
Definition at line 181 of file SO3Light.cpp.
◆ SetAttenuation() [2/2]
void SO3::SLight::SetAttenuation | ( | const float & | range, |
const float & | constant, | ||
const float & | linear, | ||
const float & | quadratic | ||
) |
Definition at line 172 of file SO3Light.cpp.
◆ SetCastShadows()
|
virtual |
Reimplemented from SO3::SNode.
Definition at line 272 of file SO3Light.cpp.
◆ SetDiffuseColour() [1/2]
void SO3::SLight::SetDiffuseColour | ( | const int & | diffuseColor | ) |
Definition at line 116 of file SO3Light.cpp.
◆ SetDiffuseColour() [2/2]
void SO3::SLight::SetDiffuseColour | ( | Ogre::ColourValue | color | ) |
Definition at line 105 of file SO3Light.cpp.
◆ SetPowerScale()
void SO3::SLight::SetPowerScale | ( | const float & | powerScale | ) |
Definition at line 137 of file SO3Light.cpp.
◆ SetRenderingDistance()
|
virtual |
Reimplemented from SO3::SNode.
Definition at line 286 of file SO3Light.cpp.
◆ SetShadowFarDistance()
void SO3::SLight::SetShadowFarDistance | ( | const float & | distance | ) |
Definition at line 195 of file SO3Light.cpp.
◆ SetSourceSize()
void SO3::SLight::SetSourceSize | ( | float | x, |
float | y | ||
) |
Definition at line 261 of file SO3Light.cpp.
◆ SetSpecularColour() [1/2]
void SO3::SLight::SetSpecularColour | ( | const int & | specularColor | ) |
Definition at line 127 of file SO3Light.cpp.
◆ SetSpecularColour() [2/2]
void SO3::SLight::SetSpecularColour | ( | Ogre::ColourValue | color | ) |
Definition at line 111 of file SO3Light.cpp.
◆ SetSpotlightFalloff()
void SO3::SLight::SetSpotlightFalloff | ( | const float & | value | ) |
Definition at line 251 of file SO3Light.cpp.
◆ SetSpotlightInnerAngle()
void SO3::SLight::SetSpotlightInnerAngle | ( | const float & | radianAngle | ) |
Definition at line 230 of file SO3Light.cpp.
◆ SetSpotlightOuterAngle()
void SO3::SLight::SetSpotlightOuterAngle | ( | const float & | radianAngle | ) |
Definition at line 240 of file SO3Light.cpp.
◆ SetType()
void SO3::SLight::SetType | ( | const LightType & | type | ) |
Definition at line 218 of file SO3Light.cpp.
◆ SetVisible()
void SO3::SLight::SetVisible | ( | const bool & | isVisible | ) |
Definition at line 149 of file SO3Light.cpp.
◆ SetVolumetric()
void SO3::SLight::SetVolumetric | ( | bool | state | ) |
Definition at line 94 of file SO3Light.cpp.
◆ UpdateShadowFarClipDistance()
void SO3::SLight::UpdateShadowFarClipDistance | ( | const float & | distance | ) |
Definition at line 207 of file SO3Light.cpp.
◆ UpdateShadowFarDistance()
void SO3::SLight::UpdateShadowFarDistance | ( | const float & | distance | ) |
Definition at line 201 of file SO3Light.cpp.
The documentation for this class was generated from the following files:
- include/SO3SceneGraph/SO3Light.h
- src/SO3SceneGraph/SO3Light.cpp
Generated by 1.9.8