Project

General

Profile

SO3Engine
SO3::SRenderToTexture Class Reference

#include <SO3RenderToTexture.h>

Inheritance diagram for SO3::SRenderToTexture:
SO3::SNode SO3::SData

Public Member Functions

 SRenderToTexture (SScene *parent, const std::string &rttName, SCamera *povCamera)
 
 ~SRenderToTexture ()
 
void SetMaterial (SMaterial *targetMaterial, const int &targetTechnique, const int &targetPass, const int &targetTextureUnit)
 
void SetMaterialScheme (std::string scheme)
 
void SetSize (const unsigned int &newSize)
 
unsigned int GetSize ()
 
void SetEnable (const bool &newState)
 
bool GetEnable ()
 
void SetAutoUpdate (const bool &newAutoUpdateValue)
 
bool GetAutoUpdate ()
 
void Update ()
 
SCompositorCreateCompositor (const std::string &newCompositorName, const std::string &newSchemeName)
 
void DeleteCompositor (SCompositor *existingCompositor)
 
void DeleteCompositor (const std::string &existingCompositorName)
 
SCompositorGetCompositor (const std::string &compositorName)
 
const SCompositorMapGetCompositorList () const
 
void ClearCompositors ()
 
virtual bool frameStarted (const Ogre::FrameEvent &evt)
 
virtual bool frameEnded (const Ogre::FrameEvent &evt)
 
virtual void loadResource (Ogre::Resource *resource)
 
virtual void windowResized (Ogre::RenderWindow *rw)
 
virtual void preViewportUpdate (const Ogre::RenderTargetViewportEvent &evt)
 
virtual void postViewportUpdate (const Ogre::RenderTargetViewportEvent &evt)
 
- Public Member Functions inherited from SO3::SNode
 SNode (SScene *parent, const std::string &nodeName, const bool &isRootNode=false)
 
virtual ~SNode ()
 
SSceneGetParentScene ()
 
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 ()
 
SBodyGetSceneNodeBody ()
 
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 ()
 
SNodeGetParentSceneNode ()
 
const SNodeMap GetChildrenNodes () const
 
virtual int GetNumChildren ()
 
void DetachAllChildren ()
 
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)
 
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)
 
SNodeGetAutoTrackingTarget ()
 
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)
 
SNodeAnimationCreateNodeAnimation (const std::string &animationName, const float &animationLength)
 
void DeleteAnimation (SAnim *existingAnimation)
 
size_t GetNumAnimations ()
 
SAnimGetAnimation (const std::string &animationName)
 
SAnimGetAnimation (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 ()
 
SBodyCreateBoxBody (const Ogre::Vector3 &boxsetting)
 
SBodyCreateBoxBody (const Ogre::Vector3 &boxsetting, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateConeBody (const Ogre::Real &radius, const Ogre::Real &height)
 
SBodyCreateConeBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateEllipsoidBody (const Ogre::Vector3 &size)
 
SBodyCreateEllipsoidBody (const Ogre::Vector3 &size, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateCapsuleBody (const Ogre::Real &radius, const Ogre::Real &height)
 
SBodyCreateCapsuleBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateCylinderBody (const Ogre::Real &radius, const Ogre::Real &height)
 
SBodyCreateCylinderBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateChamferCylinderBody (const Ogre::Real &radius, const Ogre::Real &height)
 
SBodyCreateChamferCylinderBody (const Ogre::Real &radius, const Ogre::Real &height, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreatePyramidBody (const Ogre::Vector3 &size)
 
SBodyCreatePyramidBody (const Ogre::Vector3 &size, const Ogre::Vector3 &offset, const Ogre::Quaternion &quat)
 
SBodyCreateConvexHullBody (const Ogre::Real &tolerance)
 
SBodyCreateConcaveHullBody (const Ogre::Real &tolerance)
 
SBodyCreateTreeBody (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
 
SUserObjectBindingsGetUserObjectBindings ()
 
const SUserObjectBindingsGetUserObjectBindings () const
 

Protected Member Functions

void AddCompositor (SCompositor *existingCompositor)
 
void RemoveCompositor (SCompositor *existingCompositor)
 
void RemoveCompositor (const std::string &compositorName)
 
- 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 ()
 

Additional Inherited Members

- 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 }
 
- Protected Attributes inherited from SO3::SNode
SScenecurrentScene
 
Ogre::SceneNode * O3SceneNode
 
Ogre::MovableObject * ogreMovableObject
 
SBodynodeBody
 
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 41 of file SO3RenderToTexture.h.

Constructor & Destructor Documentation

◆ SRenderToTexture()

SO3::SRenderToTexture::SRenderToTexture ( SScene parent,
const std::string &  rttName,
SCamera povCamera 
)

Definition at line 25 of file SO3RenderToTexture.cpp.

◆ ~SRenderToTexture()

SO3::SRenderToTexture::~SRenderToTexture ( )

Definition at line 52 of file SO3RenderToTexture.cpp.

Member Function Documentation

◆ AddCompositor()

void SO3::SRenderToTexture::AddCompositor ( SCompositor existingCompositor)
protected

Add a SCompositor object to the list of available compositors.

Definition at line 433 of file SO3RenderToTexture.cpp.

◆ ClearCompositors()

void SO3::SRenderToTexture::ClearCompositors ( )

Erase all the handled compositors.

Definition at line 419 of file SO3RenderToTexture.cpp.

◆ CreateCompositor()

SCompositor * SO3::SRenderToTexture::CreateCompositor ( const std::string &  newCompositorName,
const std::string &  newSchemeName 
)

Create a new SCompositor Object

Definition at line 394 of file SO3RenderToTexture.cpp.

◆ DeleteCompositor() [1/2]

void SO3::SRenderToTexture::DeleteCompositor ( const std::string &  existingCompositorName)

Definition at line 408 of file SO3RenderToTexture.cpp.

◆ DeleteCompositor() [2/2]

void SO3::SRenderToTexture::DeleteCompositor ( SCompositor existingCompositor)

Delete an existing SCompositor Object

Definition at line 413 of file SO3RenderToTexture.cpp.

◆ frameEnded()

bool SO3::SRenderToTexture::frameEnded ( const Ogre::FrameEvent &  evt)
virtual

Definition at line 324 of file SO3RenderToTexture.cpp.

◆ frameStarted()

bool SO3::SRenderToTexture::frameStarted ( const Ogre::FrameEvent &  evt)
virtual

Definition at line 309 of file SO3RenderToTexture.cpp.

◆ GetAutoUpdate()

bool SO3::SRenderToTexture::GetAutoUpdate ( )

Is the rtt is update every frame?

Definition at line 231 of file SO3RenderToTexture.cpp.

◆ GetCompositor()

SCompositor * SO3::SRenderToTexture::GetCompositor ( const std::string &  compositorName)

Return the SCompositor pointer corresponding to the name of an existing compositor handled by this class.

Definition at line 380 of file SO3RenderToTexture.cpp.

◆ GetCompositorList()

const SCompositorMap & SO3::SRenderToTexture::GetCompositorList ( ) const

Get a list of the available compositors.

Definition at line 389 of file SO3RenderToTexture.cpp.

◆ GetEnable()

bool SO3::SRenderToTexture::GetEnable ( )

Definition at line 205 of file SO3RenderToTexture.cpp.

◆ GetSize()

unsigned int SO3::SRenderToTexture::GetSize ( )

Definition at line 99 of file SO3RenderToTexture.cpp.

◆ loadResource()

void SO3::SRenderToTexture::loadResource ( Ogre::Resource *  resource)
virtual

Definition at line 334 of file SO3RenderToTexture.cpp.

◆ postViewportUpdate()

void SO3::SRenderToTexture::postViewportUpdate ( const Ogre::RenderTargetViewportEvent &  evt)
virtual

Definition at line 367 of file SO3RenderToTexture.cpp.

◆ preViewportUpdate()

void SO3::SRenderToTexture::preViewportUpdate ( const Ogre::RenderTargetViewportEvent &  evt)
virtual

Definition at line 351 of file SO3RenderToTexture.cpp.

◆ RemoveCompositor() [1/2]

void SO3::SRenderToTexture::RemoveCompositor ( const std::string &  compositorName)
protected

Remove a SCompositor object from the list of available compositors.

Definition at line 453 of file SO3RenderToTexture.cpp.

◆ RemoveCompositor() [2/2]

void SO3::SRenderToTexture::RemoveCompositor ( SCompositor existingCompositor)
protected

Remove a SCompositor object from the list of available compositors.

Definition at line 448 of file SO3RenderToTexture.cpp.

◆ SetAutoUpdate()

void SO3::SRenderToTexture::SetAutoUpdate ( const bool &  newAutoUpdateValue)

Set if the rtt is updated every frames. If false, the rtt texture will be update only when material is setted (it's not really a rtt, but a "one shot" generated rtt). Default value is true.

Definition at line 210 of file SO3RenderToTexture.cpp.

◆ SetEnable()

void SO3::SRenderToTexture::SetEnable ( const bool &  newState)

Definition at line 182 of file SO3RenderToTexture.cpp.

◆ SetMaterial()

void SO3::SRenderToTexture::SetMaterial ( SMaterial targetMaterial,
const int &  targetTechnique,
const int &  targetPass,
const int &  targetTextureUnit 
)

Definition at line 104 of file SO3RenderToTexture.cpp.

◆ SetMaterialScheme()

void SO3::SRenderToTexture::SetMaterialScheme ( std::string  scheme)

Definition at line 137 of file SO3RenderToTexture.cpp.

◆ SetSize()

void SO3::SRenderToTexture::SetSize ( const unsigned int &  newSize)

Definition at line 73 of file SO3RenderToTexture.cpp.

◆ Update()

void SO3::SRenderToTexture::Update ( )

Manually update the rtt (in case autoUpdate is false and we want update the rtt).

Definition at line 236 of file SO3RenderToTexture.cpp.

◆ windowResized()

void SO3::SRenderToTexture::windowResized ( Ogre::RenderWindow *  rw)
virtual

Definition at line 346 of file SO3RenderToTexture.cpp.


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