RigsofRods
Soft-body Physics Simulation
Public Member Functions | Private Attributes
RoR::World2ScreenConverter Class Reference

< Keeps data close for faster access. More...

#include <Utils.h>

Public Member Functions

 World2ScreenConverter (Ogre::Matrix4 view_mtx, Ogre::Matrix4 proj_mtx, Ogre::Vector2 screen_size)
 
Ogre::Vector3 Convert (Ogre::Vector3 world_pos)
 

Private Attributes

Ogre::Matrix4 m_view_matrix
 
Ogre::Matrix4 m_projection_matrix
 
Ogre::Vector2 m_screen_size
 

Detailed Description

< Keeps data close for faster access.

Author
http://www.ogre3d.org/forums/viewtopic.php?p=463232#p463232
http://www.ogre3d.org/tikiwiki/tiki-index.php?page=GetScreenspaceCoords&structure=Cookbook

Definition at line 81 of file Utils.h.

Constructor & Destructor Documentation

◆ World2ScreenConverter()

RoR::World2ScreenConverter::World2ScreenConverter ( Ogre::Matrix4  view_mtx,
Ogre::Matrix4  proj_mtx,
Ogre::Vector2  screen_size 
)
inline

Definition at line 84 of file Utils.h.

Member Function Documentation

◆ Convert()

Ogre::Vector3 RoR::World2ScreenConverter::Convert ( Ogre::Vector3  world_pos)
inline
Returns
X,Y=screen pos, Z=view space pos ('Z<0' means 'in front of the camera')

Definition at line 89 of file Utils.h.

+ Here is the caller graph for this function:

Field Documentation

◆ m_projection_matrix

Ogre::Matrix4 RoR::World2ScreenConverter::m_projection_matrix
private

Definition at line 100 of file Utils.h.

◆ m_screen_size

Ogre::Vector2 RoR::World2ScreenConverter::m_screen_size
private

Definition at line 101 of file Utils.h.

◆ m_view_matrix

Ogre::Matrix4 RoR::World2ScreenConverter::m_view_matrix
private

Definition at line 99 of file Utils.h.


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