Eidolon
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
OgreCamera Class Reference

#include <OgreRenderTypes.h>

Inheritance diagram for OgreCamera:
Inheritance graph
Collaboration diagram for OgreCamera:
Collaboration graph

Public Member Functions

 OgreCamera (Ogre::Camera *camera, Ogre::Viewport *port, OgreRenderScene *scene, u32 id)
 
virtual ~OgreCamera ()
 
virtual const char * getName () const
 
virtual vec3 getPosition () const
 
virtual vec3 getLookAt () const
 
virtual rotator getRotation () const
 
virtual vec3 getScreenPosition (vec3 pos) const
 Returns the (x,y) screen coordinate of the vector `pos' as drawn with the current camera configuration. More...
 
virtual mat4 getViewMatrix () const
 
virtual mat4 getProjMatrix () const
 
virtual void setPosition (const vec3 &v)
 
virtual void setLookAt (const vec3 &v)
 
virtual void rotate (const rotator &r)
 
virtual void setRotation (const rotator &r)
 
virtual void setUp (const vec3 &v)
 
virtual void setZUp ()
 
virtual void setNearClip (real dist)
 
virtual void setFarClip (real dist)
 
virtual void setVertFOV (real rads)
 
virtual real getVertFOV () const
 
virtual real getNearClip () const
 
virtual real getFarClip () const
 
virtual sval getWidth () const
 
virtual sval getHeight () const
 
virtual u32 getVisibilityMask () const
 
virtual void setBGColor (const color &c)
 
virtual void setAspectRatio (real rat)
 
virtual real getAspectRatio () const
 Get the aspect ratio of the notional box this camera sees through and shall render to a target. More...
 
virtual RaygetProjectedRay (real x, real y, bool isAbsolute=true) const
 
virtual void setViewport (real left=0.0f, real top=0.0f, real width=1.0f, real height=1.0f)
 
virtual void setOrtho (bool isOrtho)
 
virtual void setWireframe (bool isWireframe)
 
virtual void setSecondaryCamera (bool secondary)
 
virtual bool isPointInViewport (int x, int y) const
 
virtual bool isSecondaryCamera ()
 
virtual void renderToFile (const std::string &filename, sval width, sval height, TextureFormat format=TF_RGB24, real stereoOffset=0.0) throw (RenderException)
 Create an offscreen texture, render to it, then write the contents to the file `filename', assuming it's extension is for an understood format. More...
 
virtual void renderToStream (void *stream, sval width, sval height, TextureFormat format=TF_RGB24, real stereoOffset=0.0) throw (RenderException)
 Create an offscreen texture, render to it, then blit the contents to `stream', which must be large enough for data of the given texture format. More...
 
virtual ImagerenderToImage (sval width, sval height, TextureFormat format=TF_RGB24, real stereoOffset=0.0) throw (RenderException)
 Create an offscreen texture, render to it, then blit the contents to the returned Image object, which can then be used to save the image to file. More...
 
- Public Member Functions inherited from Camera
 Camera ()
 
virtual ~Camera ()
 
virtual vec3 getWorldPosition (real x, real y, bool isAbsolute=true) const
 Returns the world position of screen coordinate (x,y), which is either absolute pixel coordinates or relative screen proportion values (see getProjectedRay()) More...
 

Protected Member Functions

void renderToTexture (sval width, sval height, TextureFormat format, real stereoOffset) throw (RenderException)
 Render to the off-screen texture `rtt_texture' with the given parameters in stereo if `stereoOffset'>0.0. More...
 

Protected Attributes

Ogre::Camera * camera
 
Ogre::Viewport * port
 
OgreRenderScenescene
 
u32 id
 
Ogre::TexturePtr rtt_texture
 
vec3 position
 
vec3 lookat
 

Constructor & Destructor Documentation

◆ OgreCamera()

OgreCamera ( Ogre::Camera *  camera,
Ogre::Viewport *  port,
OgreRenderScene scene,
u32  id 
)
inline

◆ ~OgreCamera()

~OgreCamera ( )
virtual

Member Function Documentation

◆ getAspectRatio()

virtual real getAspectRatio ( ) const
inlinevirtual

Get the aspect ratio of the notional box this camera sees through and shall render to a target.

Reimplemented from Camera.

◆ getFarClip()

virtual real getFarClip ( ) const
inlinevirtual

Reimplemented from Camera.

◆ getHeight()

virtual sval getHeight ( ) const
inlinevirtual

Reimplemented from Camera.

◆ getLookAt()

virtual vec3 getLookAt ( ) const
inlinevirtual

Reimplemented from Camera.

◆ getName()

virtual const char* getName ( ) const
inlinevirtual

Reimplemented from Camera.

Here is the caller graph for this function:

◆ getNearClip()

virtual real getNearClip ( ) const
inlinevirtual

Reimplemented from Camera.

◆ getPosition()

virtual vec3 getPosition ( ) const
inlinevirtual

Reimplemented from Camera.

◆ getProjectedRay()

virtual Ray* getProjectedRay ( real  x,
real  y,
bool  isAbsolute = true 
) const
inlinevirtual

Get the projected ray from a point on the screen, (x,y) are real render target (widget) screen coordinates if `isAbsolute' is true, otherwise (x,y) are relative screen proportion values ranging over the unit square. In either case the top left corner of the camera's view area is (0,0), the bottom right is (w,h) for view area w-by-h pixels or (1,1) for relative coords.

Reimplemented from Camera.

Here is the call graph for this function:

◆ getProjMatrix()

virtual mat4 getProjMatrix ( ) const
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:

◆ getRotation()

virtual rotator getRotation ( ) const
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:

◆ getScreenPosition()

virtual vec3 getScreenPosition ( vec3  pos) const
inlinevirtual

Returns the (x,y) screen coordinate of the vector `pos' as drawn with the current camera configuration.

Reimplemented from Camera.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getVertFOV()

virtual real getVertFOV ( ) const
inlinevirtual

Reimplemented from Camera.

◆ getViewMatrix()

virtual mat4 getViewMatrix ( ) const
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:

◆ getVisibilityMask()

virtual u32 getVisibilityMask ( ) const
inlinevirtual

◆ getWidth()

virtual sval getWidth ( ) const
inlinevirtual

Reimplemented from Camera.

◆ isPointInViewport()

virtual bool isPointInViewport ( int  x,
int  y 
) const
inlinevirtual

Reimplemented from Camera.

◆ isSecondaryCamera()

virtual bool isSecondaryCamera ( )
inlinevirtual

Reimplemented from Camera.

◆ renderToFile()

virtual void renderToFile ( const std::string &  filename,
sval  width,
sval  height,
TextureFormat  format = TF_RGB24,
real  stereoOffset = 0.0 
)
throw (RenderException
)
inlinevirtual

Create an offscreen texture, render to it, then write the contents to the file `filename', assuming it's extension is for an understood format.

Reimplemented from Camera.

◆ renderToImage()

virtual Image* renderToImage ( sval  width,
sval  height,
TextureFormat  format = TF_RGB24,
real  stereoOffset = 0.0 
)
throw (RenderException
)
inlinevirtual

Create an offscreen texture, render to it, then blit the contents to the returned Image object, which can then be used to save the image to file.

Reimplemented from Camera.

Here is the call graph for this function:

◆ renderToStream()

virtual void renderToStream ( void *  stream,
sval  width,
sval  height,
TextureFormat  format = TF_RGB24,
real  stereoOffset = 0.0 
)
throw (RenderException
)
inlinevirtual

Create an offscreen texture, render to it, then blit the contents to `stream', which must be large enough for data of the given texture format.

Reimplemented from Camera.

Here is the call graph for this function:

◆ renderToTexture()

void renderToTexture ( sval  width,
sval  height,
TextureFormat  format,
real  stereoOffset 
)
throw (RenderException
)
protected

Render to the off-screen texture `rtt_texture' with the given parameters in stereo if `stereoOffset'>0.0.

Here is the call graph for this function:

◆ rotate()

virtual void rotate ( const rotator r)
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setAspectRatio()

virtual void setAspectRatio ( real  rat)
inlinevirtual

Reimplemented from Camera.

Here is the caller graph for this function:

◆ setBGColor()

virtual void setBGColor ( const color c)
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:

◆ setFarClip()

virtual void setFarClip ( real  dist)
inlinevirtual

Reimplemented from Camera.

Here is the caller graph for this function:

◆ setLookAt()

virtual void setLookAt ( const vec3 v)
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:

◆ setNearClip()

virtual void setNearClip ( real  dist)
inlinevirtual

Reimplemented from Camera.

Here is the caller graph for this function:

◆ setOrtho()

virtual void setOrtho ( bool  isOrtho)
inlinevirtual

Reimplemented from Camera.

◆ setPosition()

virtual void setPosition ( const vec3 v)
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setRotation()

virtual void setRotation ( const rotator r)
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSecondaryCamera()

virtual void setSecondaryCamera ( bool  secondary)
inlinevirtual

Reimplemented from Camera.

◆ setUp()

virtual void setUp ( const vec3 v)
inlinevirtual

Reimplemented from Camera.

◆ setVertFOV()

virtual void setVertFOV ( real  rads)
inlinevirtual

Reimplemented from Camera.

◆ setViewport()

virtual void setViewport ( real  left = 0.0f,
real  top = 0.0f,
real  width = 1.0f,
real  height = 1.0f 
)
inlinevirtual

Reimplemented from Camera.

◆ setWireframe()

virtual void setWireframe ( bool  isWireframe)
inlinevirtual

Reimplemented from Camera.

◆ setZUp()

virtual void setZUp ( )
inlinevirtual

Reimplemented from Camera.

Here is the call graph for this function:

Member Data Documentation

◆ camera

Ogre::Camera* camera
protected

◆ id

u32 id
protected

◆ lookat

vec3 lookat
protected

◆ port

Ogre::Viewport* port
protected

◆ position

vec3 position
protected

◆ rtt_texture

Ogre::TexturePtr rtt_texture
protected

◆ scene

OgreRenderScene* scene
protected

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