VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | Friends
makVrv::DtVirtualRealityChannel Class Reference

A VRV channel that represents the eyes of the HMD A Virtual Reality channel can render in a few different modes. More...

Inheritance diagram for makVrv::DtVirtualRealityChannel:
Inheritance graph
[legend]

Public Member Functions

virtual ~DtVirtualRealityChannel ()
 DTOR. More...
 
virtual bool initialize ()
 overloaded initialize function to call resetViewport More...
 
virtual void setWidth (int width)
 if you adjust the width/height, call before setting RTT(true). More...
 
virtual void setHeight (int height)
 set the channel height More...
 
virtual void setViewport (int x, int y, int width, int height)
 Set the viewport. More...
 
virtual void resetViewport ()
 resets the viewport of the channel using the user set width/height. More...
 
virtual void setRenderToTexture (bool enabled)
 Toggles whether this channel renders the scene to a texture. More...
 
virtual void setIsMultiView (bool enabled, bool useAA)
 flag that we want the render texture to be setup to use OVR_multiview extension and render two views at once. More...
 
virtual bool isMultiView () const
 return true if multivew is active More...
 
virtual void setIgnoreZoom (bool ignore)
 flag the channel to ignore projection zoom More...
 
virtual bool isIgnoringZoom () const
 returns true if the channel is ignoring zoom More...
 
virtual void setProjectionConfiguration (DtChannelConfiguration::ProjectionUnits units, float left, float right, float bottom, float top, float zNear, float zFar)
 sets the projection configuration for the channel More...
 
virtual void setCameraOffsetConfiguration (const osg::Vec3d &trans, const osg::Quat &ori)
 sets the camera offset configuration for the channel More...
 
virtual void getNearFar (double &zNear, double &zFar)
 gets the projection near and far clip settings More...
 
virtual osg::Matrix calculateEyeProjecionMatrix (DtChannelConfiguration::ProjectionUnits units, float left, float right, float bottom, float top, float zNear, float zFar)
 
virtual void setFrustumAnglesForEye (osg::Vec4 frustumAngles, int multiViewEye)
 sets myEyeFrustumAngles for a specific eye, used in multiview More...
 
virtual void setProjectionMatrixForEye (osg::Matrix matrix, int multiViewEye)
 set the projection matrix uniform for a specific eye, used in multiview More...
 
osg::Uniform * eyeProjectionMatrixUniform ()
 return the eye projection matrix uniform More...
 
osg::Uniform * eyeInverseProjectionMatrixUniform ()
 return the eye inverse projection matrix uniform More...
 
virtual void updateProjectionConfigurationForMultiView ()
 sets the Projection configuration based on the eye frustum angles set for multiview More...
 
osg::Uniform * eyeOffsetMatrixUniform ()
 return the eye offset matrix uniform More...
 
void setOffsetForEye (osg::Vec3 offset, osg::Vec3 cameraSpaceOffset, int multiViewEye)
 set the eye offset matrix uniform for a specific eye, used in multiview More...
 
DtVariableRateShadingImageshadingRateImage () const
 
DtVariableRateShadingImagePaletteshadingRateImagePalette () const
 
- Public Member Functions inherited from makVrv::DtOsgChannel
virtual ~DtOsgChannel ()
 DTOR. More...
 
virtual void setSensorName (const std::string &sensorName)
 Set the name of the sensor to use. More...
 
virtual void setClearColor (float r, float g, float b, float a)
 Set the clear color for the channel. More...
 
virtual void setWindow (DtWindow *view)
 Set the window the channel is displayed on. More...
 
virtual const DtWindowwindow () const
 Get the window the channel is displayed on. More...
 
virtual void clearFrameBufferIfChanged ()
 If something that would mess with the area of the frame buffer outside the current channel needs to be cleaned up then this fucntion will clear the framebuffer. More...
 
virtual void getViewport (int &x, int &y, int &width, int &height) const
 Get the viewport. More...
 
virtual void setCameraPosition (double x, double y, double z)
 Set the camera position. More...
 
virtual void setCameraOrientation (double psi, double theta, double phi)
 Set the camera orientation. More...
 
virtual void setCameraPositionAndOrientation (double x, double y, double z, double psi, double theta, double phi)
 Set camera position and orientation. More...
 
virtual void setCameraPositionAndOrientation (osg::Vec3d &pos, osg::Quat &orient)
 
virtual void getCameraPositionAndOrientation (osg::Vec3d &position, osg::Quat &rotation) const
 Get the camera position and orientation. More...
 
virtual void setChannelEnabled (bool enabled)
 Enable/Disable the channel. More...
 
virtual bool channelEnabled () const
 Enable/Disable the channel. More...
 
virtual void update ()
 Update a channel. More...
 
virtual void connectToObserver ()
 Set up based on current observer parameters, such as modelSet and is2D. More...
 
virtual osgViewer::View & view ()
 Window accessor. More...
 
virtual DtCameraNodesceneCamera ()
 Accessor for the 3D camera. More...
 
virtual const DtCameraNodesceneCamera () const
 Accessor for the 3D camera. More...
 
virtual DtCameraNoderttCamera () const
 Accessor for RTT camera. More...
 
virtual DtCameraNodeactiveMainCamera ()
 Accessor for which ever camera is currently the main render camera. More...
 
virtual const DtCameraNodeactiveMainCamera () const
 Accessor for which ever camera is currently the main render camera. More...
 
virtual DtCameraNodeoverlayCamera ()
 Accessor for the 2D overlay camera. More...
 
virtual DtCameraNodenormalizedOverlayCamera ()
 Accessor for the normalized 2D overlay camera. More...
 
virtual void setRenderToTextureFormat (int format, int sourceFormat, int sourceType)
 sets the render to texture format for the rttCamera, this was separated from the setRenderToTexture format function so that the SensorFX module could use HDR rendere to texture More...
 
virtual osg::ref_ptr
< osg::Texture > 
getRenderTexture ()
 Gets the texture the scene was rendered to, if setRenderToTexture was enabled. More...
 
virtual osg::ref_ptr
< osg::Texture > 
getOcculsionTexture ()
 
virtual osg::ref_ptr
< osg::Texture > 
getDepthTexture () const
 Returns the depth texture for this channel. More...
 
virtual void depthTextureUsesStencilBuffer (bool useStencil)
 Set the depth texture in RTT mode to use a stencil buffer. More...
 
virtual bool depthTextureUsesStencilBuffer ()
 Return if the depth texture should be using stencil buffer. More...
 
virtual void setEnablePostProcessors (bool enable)
 
virtual bool getEnablePostProcessors ()
 
virtual bool useOldChannelOffsetCalcuation () const
 
virtual void setUseOldChannelOffsetCalcuation (bool enable)
 
virtual bool forceHdrLuminanceOverride ()
 should the HDR post processor force the luminance scalar to 1.0 for this channel used for when the sky is turned off (XR mode) More...
 
virtual void setForceHdrLuminanceOverride (bool force)
 
virtual void clearStateGraph (void)
 osg maintains an internal cache of StateSets in a StateGraph More...
 
virtual void setEnableHdrPassthrough (bool flag)
 getter/setter for the whether the HDR post processor More...
 
virtual bool enableHdrPassthrough ()
 
virtual void setHdrOutputScale (float scale)
 set the hdr output scale to use with this channel it does not necessarily match the shared state when correlation is turned off More...
 
virtual float hdrOutputScale ()
 get the hdr output scale to use with this channel it does not necessarily match the shared state when correlation is turned off More...
 
virtual void screenCapture ()
 Takes Screen capture of the current channel. More...
 
virtual void setOcclusionTextureEnabled (bool enabled)
 enable or disable the creation of an occlusion texture, used for some screen space effects More...
 
virtual void initOcclusionTexture ()
 init occlusion texture, used for some screen space effects More...
 
virtual void updateCameraFrustumPlanes (std::vector< DtVector4< double > > &planes)
 Set the Frustum planes for this channel. More...
 
virtual void updateAcquisitionBoxFrustumPlanes (const int &boxCenterX, const int &boxCenterY, const int &boxWidth, const int &boxHeight, std::vector< DtVector4< double > > &planes)
 Set the frustum planes for a subset of this channel Scales the channels projection values based on the box's values that are passed in. More...
 
virtual void setChannelSensor (DtOsgChannelSensor *extension)
 Set an extension. More...
 
virtual DtOsgChannelSensorfindChannelSensor ()
 
virtual void releaseResources (osg::State *gcState)
 called by the window manager when the last window is about to be destroyed in order to give the channel a chance to release it's resources before the final flush. More...
 
virtual void updateShowTracksUniform (bool value)
 update the scene and rtt camera uniforms for the show tracks observer mode setting. More...
 
virtual int shadowQuality () const
 
virtual std::vector< const
osg::Camera * > 
getShadowableCameras () const
 Used by DtOsgShadowTechnique::setChannelShadowState to determine which cameras should have shadows. More...
 
*virtual void setProjectionResizePolicy (DtChannelConfiguration::ProjectionResizePolicy policy)
 Set the policy used to determine if and how the projection matrix should be adjusted on window resizes. More...
 
virtual void projectionUnitsToFrustum (DtChannelConfiguration::ProjectionUnits units, double &left, double zNear, double &right, double &top, double &bottom)
 
virtual void connectChannelToScene ()
 Set the channel's scene graph root. More...
 
virtual bool processMouseEvent (const DtMouseEvent &ev)
 attempt to handle a mouse event with the channel's overlay More...
 
virtual bool processKeyboardEvent (const DtKeyEvent &ev)
 attempt to handle a keyboard event with the channel's overlay More...
 
virtual void getWorldToWindowMatrix (osg::Matrix &worldToWindowMatrix) const
 Get the channel's dynamic overlay if any. More...
 
virtual void moveMouseToScreenLocation (float screenX, float screenY)
 Move the mouse pointer to the specified location in screen coordinates. More...
 
virtual void projectToScreen (double dbX, double dbY, double dbZ, double &screenX, double &screenY, double &screenZ)
 Project a point from world coordinates to screen coordinates. More...
 
virtual void projectToWorld (double screenX, double screenY, double &dbX, double &dbY, double &dbZ)
 project the local world coordinates given screen coordinates More...
 
virtual DtIntersectorResult findWorldIntersection (double screenX, double screenY)
 project the screen coordinates and intersects the world More...
 
virtual const std::string & name ()
 Returns the channel's name as defined in its configuration. More...
 
virtual void addPostProcessEffect (const std::string &postProcessorEffect)
 Add post processor effect names to be enabled during the DtOsgChannel update function The order of the effects is set in the DtPostProcessorFactory. More...
 
virtual void removePostProcessEffect (const std::string &postProcessorEffect)
 Remove post processor effect names to be enabled during the DtOsgChannel update function The order of the effects is set in the DtPostProcessorFactory. More...
 
virtual void set3DCullVisitorParams (DtOsgCullVisitorParameters *params)
 
virtual void set2DCullVisitorParams (DtOsgCullVisitorParameters *params)
 
- Public Member Functions inherited from makVrv::DtChannel
virtual ~DtChannel ()
 DTOR. More...
 
DtObserverObjectfindObserver () const
 Attempt to get the observer for the channel. More...
 
unsigned int currentModelSet () const
 Get the current model set. More...
 
const DtChannelConfigurationconfiguration () const
 Get the configuration. More...
 
virtual void setObserverName (const std::string &observerName)
 set the name of the observer to use, and attempt to connect More...
 
*virtual
DtChannelConfiguration::ProjectionResizePolicy 
projectionResizePolicy () const
 Get the policy used to determine if and how the projection matrix should be adjusted on window resizes. More...
 
std::string & observerName ()
 Retrieve the observer name for this channel. More...
 

Public Attributes

boost::signalslib::signal< void()> signal_renderTextureChanged
 signaled any time the underlying texture target changes. More...
 
- Public Attributes inherited from makVrv::DtOsgChannel
boost::signalslib::signal
< void(int, int, int, int)> 
signal_viewportChanged
 Emitted when the channel's viewport changes dimensions. More...
 

Protected Member Functions

 DtVirtualRealityChannel (DtDe &de, DtOsgWindow *window, DtChannelConfiguration &config)
 
virtual void projectFor3D ()
 Projects frustum matrix for 3D viewing. More...
 
virtual void projectFor2D ()
 overload function to create 2D projection matrix using user set width/height More...
 
virtual void updateProjection ()
 overload function to update projection using user set width/height More...
 
virtual void slot_windowConfigurationModified (const std::string &, const std::string &, const DtWindowConfiguration &)
 overloaded slot called when window configuration changes. More...
 
virtual void initializeSignalConnections ()
 overloaded function to setup signal connections so overloaded slot_windowConfigurationModified is called More...
 
virtual void getRenderTextureAttachmentInfo (unsigned int &level, unsigned int &face, unsigned int &sampleBuffers, unsigned int &samples)
 brief override so we can set the face value to FACE_CONTROLLED_BY_MULTIVIEW_SHADER and disable samples etc for now if multiview is enabled More...
 
virtual osg::ref_ptr
< osg::Texture > 
allocateRenderTexture (int width, int height) const
 Allocate a new texture and set its size, allows custom channedl (DtVirtualRealityChannel) to override. More...
 
- Protected Member Functions inherited from makVrv::DtOsgChannel
 DtOsgChannel (DtDe &de, DtOsgWindow *window, DtChannelConfiguration &config)
 Called by Creator object. More...
 
virtual void makeObserverToCameraMatrix (osg::Vec3d &orient, osg::Matrixd &offsetObserverToCamera, osg::Matrixd &observerToCamera)
 
virtual void makeObserverToCameraMatrix (osg::Quat &qObserverToWorld, osg::Matrixd &offsetObserverToCamera, osg::Matrixd &observerToCamera)
 
virtual void calculateNearFar (double &zNear, double &zFar)
 Calculates near/far depending on visual mode. More...
 
virtual bool useAttachedForNearClip (double alt)
 When using dynamic clipping plane calculations, determine if channel's view is attached to an entity and that entity should be taken into consideration. More...
 
virtual double calculateNearClip (double alt, double zFar)
 Calculate the dynamic near clipping plane. More...
 
virtual double calculateFarClip (double alt)
 Calculate the dynamic far clipping plane. More...
 
virtual double calculateNearClipMagClamp (double zNear, double zFar, float magLevel=2.)
 When the NEAR_FAR_DYNAMIC_CLAMP_NEAR_CLIP policy is enabled, this is called with the calculated near and far dynamic clipping planes. More...
 
virtual void connectRttCameraToScene ()
 This method is called by initializeRTTCamera and connectChannelToScene to handle the scene setup (including the overlay cameras) for the rtt camera. More...
 
virtual void stopUsingModelSet (int modelSet)
 Stop rendering the specified model set on this channel. More...
 
virtual void startUsingModelSet (int modelSet)
 Start rendering the specified model set on this channel. More...
 
virtual void slot_visualizerRootAdded (int modelSet, int visualType)
 called by signal when a new visualizer root is added More...
 
virtual void slot_shadowsRemoved ()
 Called by signal when the renderer removes all shadows. More...
 
virtual void slot_observerModelSetChanged (DtObserverObject *observer, int modelSet)
 Called by signal when an observer's model set changes. More...
 
virtual void slot_observerSettingChanged (DtObserverObject *observer, int setting, bool value)
 Called by signal when an observer's visual setting changes. More...
 
virtual void slot_observerSettingRemoved (DtObserverObject *observer, int setting)
 Called by signal when an observer's visual setting is removed. More...
 
virtual void slot_projectionChanged (DtObserverObject *observer, bool is2D)
 Called by signal when an observer's projection (3D/2D) changes. More...
 
virtual void slot_channelConfigurationModified (const std::string &deName, const std::string &windowName, const std::string &oldChannelName, const DtChannelConfiguration &channelConfig)
 slot to be called when the channel configuration changes. More...
 
virtual void slot_onCoordinateSystemChanged ()
 receive signals from the shared state about coordinate system changes More...
 
virtual void slot_paperMapEnabledChanged (bool setting)
 Receives signals from the shared state about paper map feature changes (i.e. More...
 
virtual void observerRemoved (const std::string &observerName)
 connects to signal_observerRemoved so the channel can update it's observer when the observer is removed. More...
 
virtual void updateMultiSampleOverrideSetting ()
 helper function for getting the imgui setting for the multi sample override More...
 
virtual void initializeRenderTextureColor ()
 Create and initialize render texture color buffer. More...
 
virtual void initializeRenderTextureDepth ()
 Create and initialize render texture depth buffer. More...
 
virtual void enableLighting (osg::ref_ptr< osg::Camera > camera, bool enable)
 
virtual void calculateAndSetFocusPointDistance (double zNear, double zFar)
 Calculate the focus point if the lod scale center is enabled and the zoom magnification is higher than the limit. More...
 
osgViewer::CompositeViewer * getOrCreateViewer ()
 Returns the CompositeViewer for the channel. More...
 
virtual void initializeNormalized2DCamera ()
 
virtual void initialize2DCamera (int w, int h)
 
virtual void initializeSceneCamera ()
 
virtual void initializeRenderTexture ()
 
virtual void initializeRTTCamera ()
 
virtual void clearRttCamera ()
 
virtual void recreateRTTCamera ()
 
virtual void setShadowState (bool enable)
 
virtual void addOverlayDrawablesToCameras ()
 Add drawables to render overlays to their respective cameras. More...
 
- Protected Member Functions inherited from makVrv::DtChannel
 DtChannel (DtDe &de, DtChannelConfiguration &)
 The constructor for an abstract class is not public. More...
 
virtual void observerAdded (const std::string &observerName)
 connected to the signal_observerAdded so the channel can connect to the correct observer when it is added More...
 

Protected Attributes

int myWidth
 
int myHeight
 
bool myIsMultiView
 is multiview being used More...
 
bool myMultiViewUsesAA
 should this channel use aa when in multiview More...
 
bool myIgnoreZoom
 should this channel ignore zoom when computing projection More...
 
osg::Vec4 myEyeFrustumAngles [2]
 store the eye frustum angles so we can more easily update the projection later More...
 
osg::ref_ptr< osg::Uniform > myEyeProjectionMatrixUniform
 projection matrix uniform for the multiview eyes, single uniform accessing an array of two mat4 values in the shader More...
 
osg::ref_ptr< osg::Uniform > myEyeInverseProjectionMatrixUniform
 inverse projection matrix uniform for the multiview eyes, single uniform accessing an array of two mat4 values in the shader More...
 
osg::ref_ptr< osg::Uniform > myEyeOffsetMatrixUniform
 view space offect matrix for the multiview eyes, single uniform accessing an array of two mat4 values in the shader More...
 
osg::ref_ptr
< DtVariableRateShadingImage
myShadingRateImage
 
osg::ref_ptr
< DtVariableRateShadingImagePalette
myShadingRateImagePalette
 
- Protected Attributes inherited from makVrv::DtOsgChannel
osg::ref_ptr< osgViewer::View > myView
 
DtOsgWindowmyOsgWindow
 
DtOsgObserverObjectmyOsgObserverObject
 
int myRenderTextureFormat
 
int myRenderTextureSourceFormat
 
int myRenderTextureSourceType
 
bool myRenderTextureFormatDirty
 
bool mySensorInitialized
 
bool myChannelEnabled
 
osg::ref_ptr< osg::Group > myRoot
 
osg::ref_ptr< DtCameraNodemySceneCamera
 
osg::ref_ptr< DtCameraNodemy2DCamera
 
osg::ref_ptr< DtCameraNodemyNormalized2DCamera
 
osg::ref_ptr< osg::Texture > myRenderTexture
 The textures the 3D scene renders into when post processing is on. More...
 
osg::ref_ptr< osg::Texture > myDepthTexture
 
osg::ref_ptr< osg::Texture > myOcclusionTexture
 
bool myDepthTextureUsesStencilBuffer
 
osg::ref_ptr< DtCameraNodemyRTTCamera
 Slave camera configured to render to myRenderTexture. More...
 
bool myIsUsingTrackballManipulator
 
bool myCoordinateSystemChanged
 
bool myRenderToTextureFlag
 
bool myShadowState
 
PostProcessorEffectList myPostProcessorEffects
 
osg::Node::NodeMask myOldSceneCameraNodeMask
 
DtLightmyFlashlight
 
bool myEnablePostProcessors
 
bool myUseOldChannelOffsetCalcuation
 
osg::ref_ptr
< osg::DatabaseRequestHandlerCallback > 
myDatabasePagerCallback
 
bool myEnableHdrPassthrough
 
bool myForceHdrLuminanceOverride
 
float myHdrOutputScale
 
bool myFrameBufferNeedsClear
 
double myPreviousClampedNearClipDistance
 
int myLastNumMultiSamplesOverride
 
std::vector< osg::Vec3d > myFocusPoints
 
int myLastFocusPointAttempted
 
bool myLastFocusPointAttemptedOsgEarthFailed
 
DtOsgChannelSensormyChannelSensor
 
bool myShowTracksEnabled
 
- Protected Attributes inherited from makVrv::DtChannel
DtDemyDe
 
DtChannelConfigurationmyChannelConfiguration
 
DtSignalConnectionManager myConnections
 
int myModelSet
 
DtObserverObjectmyObserver
 
std::string myObserverName
 
DtChannelConfiguration::ProjectionResizePolicy myProjectionResizePolicy
 

Private Member Functions

 DtVirtualRealityChannel ()
 Default Constructor not implemented. More...
 
 DtVirtualRealityChannel (const DtVirtualRealityChannel &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtVirtualRealityChanneloperator= (const DtVirtualRealityChannel &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Friends

class DtVirtualRealityChannelCreator
 

Additional Inherited Members

- Public Types inherited from makVrv::DtOsgChannel
typedef std::list< std::string > PostProcessorEffectList
 
- Protected Types inherited from makVrv::DtOsgChannel
typedef std::map< int,
DtChannelSpecificGroup * > 
VisualTypeMap
 

Detailed Description

A VRV channel that represents the eyes of the HMD A Virtual Reality channel can render in a few different modes.

main ones being single channel per eye, or multiview mode where multiple views are rendered in a single pass. In the multiview instance the channels render texture becomes a Texture2DArray and each view is rendered to a different layer of the array.

Constructor & Destructor Documentation

makVrv::DtVirtualRealityChannel::DtVirtualRealityChannel ( DtDe de,
DtOsgWindow window,
DtChannelConfiguration config 
)
protected
virtual makVrv::DtVirtualRealityChannel::~DtVirtualRealityChannel ( )
virtual

DTOR.

makVrv::DtVirtualRealityChannel::DtVirtualRealityChannel ( )
private

Default Constructor not implemented.

makVrv::DtVirtualRealityChannel::DtVirtualRealityChannel ( const DtVirtualRealityChannel other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

virtual bool makVrv::DtVirtualRealityChannel::initialize ( )
virtual

overloaded initialize function to call resetViewport

Reimplemented from makVrv::DtOsgChannel.

virtual void makVrv::DtVirtualRealityChannel::setWidth ( int  width)
virtual

if you adjust the width/height, call before setting RTT(true).

Internally calls resetViewport Sets the channel width

virtual void makVrv::DtVirtualRealityChannel::setHeight ( int  height)
virtual

set the channel height

virtual void makVrv::DtVirtualRealityChannel::setViewport ( int  x,
int  y,
int  width,
int  height 
)
virtual

Set the viewport.

Reimplemented from makVrv::DtOsgChannel.

virtual void makVrv::DtVirtualRealityChannel::resetViewport ( )
virtual

resets the viewport of the channel using the user set width/height.

virtual void makVrv::DtVirtualRealityChannel::setRenderToTexture ( bool  enabled)
virtual

Toggles whether this channel renders the scene to a texture.

Overloaded to not allow the ability to disable render to texture for this channel, since it's only useful with RTT. The post processing manager will attempt to turn it off if there is not an active postprocessor, which ends up breaking things for users of this type of channel.

Reimplemented from makVrv::DtOsgChannel.

virtual void makVrv::DtVirtualRealityChannel::setIsMultiView ( bool  enabled,
bool  useAA 
)
virtual

flag that we want the render texture to be setup to use OVR_multiview extension and render two views at once.

virtual bool makVrv::DtVirtualRealityChannel::isMultiView ( ) const
virtual

return true if multivew is active

virtual void makVrv::DtVirtualRealityChannel::setIgnoreZoom ( bool  ignore)
virtual

flag the channel to ignore projection zoom

virtual bool makVrv::DtVirtualRealityChannel::isIgnoringZoom ( ) const
virtual

returns true if the channel is ignoring zoom

virtual void makVrv::DtVirtualRealityChannel::setProjectionConfiguration ( DtChannelConfiguration::ProjectionUnits  units,
float  left,
float  right,
float  bottom,
float  top,
float  zNear,
float  zFar 
)
virtual

sets the projection configuration for the channel

virtual void makVrv::DtVirtualRealityChannel::setCameraOffsetConfiguration ( const osg::Vec3d &  trans,
const osg::Quat &  ori 
)
virtual

sets the camera offset configuration for the channel

virtual void makVrv::DtVirtualRealityChannel::getNearFar ( double zNear,
double zFar 
)
virtual

gets the projection near and far clip settings

virtual osg::Matrix makVrv::DtVirtualRealityChannel::calculateEyeProjecionMatrix ( DtChannelConfiguration::ProjectionUnits  units,
float  left,
float  right,
float  bottom,
float  top,
float  zNear,
float  zFar 
)
virtual
virtual void makVrv::DtVirtualRealityChannel::setFrustumAnglesForEye ( osg::Vec4  frustumAngles,
int  multiViewEye 
)
virtual

sets myEyeFrustumAngles for a specific eye, used in multiview

virtual void makVrv::DtVirtualRealityChannel::setProjectionMatrixForEye ( osg::Matrix  matrix,
int  multiViewEye 
)
virtual

set the projection matrix uniform for a specific eye, used in multiview

osg::Uniform* makVrv::DtVirtualRealityChannel::eyeProjectionMatrixUniform ( )

return the eye projection matrix uniform

osg::Uniform* makVrv::DtVirtualRealityChannel::eyeInverseProjectionMatrixUniform ( )

return the eye inverse projection matrix uniform

virtual void makVrv::DtVirtualRealityChannel::updateProjectionConfigurationForMultiView ( )
virtual

sets the Projection configuration based on the eye frustum angles set for multiview

osg::Uniform* makVrv::DtVirtualRealityChannel::eyeOffsetMatrixUniform ( )

return the eye offset matrix uniform

void makVrv::DtVirtualRealityChannel::setOffsetForEye ( osg::Vec3  offset,
osg::Vec3  cameraSpaceOffset,
int  multiViewEye 
)

set the eye offset matrix uniform for a specific eye, used in multiview

DtVariableRateShadingImage* makVrv::DtVirtualRealityChannel::shadingRateImage ( ) const
DtVariableRateShadingImagePalette* makVrv::DtVirtualRealityChannel::shadingRateImagePalette ( ) const
virtual void makVrv::DtVirtualRealityChannel::projectFor3D ( )
protectedvirtual

Projects frustum matrix for 3D viewing.

Reimplemented from makVrv::DtOsgChannel.

virtual void makVrv::DtVirtualRealityChannel::projectFor2D ( )
protectedvirtual

overload function to create 2D projection matrix using user set width/height

Reimplemented from makVrv::DtOsgChannel.

virtual void makVrv::DtVirtualRealityChannel::updateProjection ( )
protectedvirtual

overload function to update projection using user set width/height

Reimplemented from makVrv::DtOsgChannel.

virtual void makVrv::DtVirtualRealityChannel::slot_windowConfigurationModified ( const std::string &  ,
const std::string &  ,
const DtWindowConfiguration  
)
protectedvirtual

overloaded slot called when window configuration changes.

Reimplemented from makVrv::DtOsgChannel.

virtual void makVrv::DtVirtualRealityChannel::initializeSignalConnections ( )
protectedvirtual

overloaded function to setup signal connections so overloaded slot_windowConfigurationModified is called

Reimplemented from makVrv::DtOsgChannel.

virtual void makVrv::DtVirtualRealityChannel::getRenderTextureAttachmentInfo ( unsigned int level,
unsigned int face,
unsigned int sampleBuffers,
unsigned int samples 
)
protectedvirtual

brief override so we can set the face value to FACE_CONTROLLED_BY_MULTIVIEW_SHADER and disable samples etc for now if multiview is enabled

Reimplemented from makVrv::DtOsgChannel.

virtual osg::ref_ptr<osg::Texture> makVrv::DtVirtualRealityChannel::allocateRenderTexture ( int  width,
int  height 
) const
protectedvirtual

Allocate a new texture and set its size, allows custom channedl (DtVirtualRealityChannel) to override.

Reimplemented from makVrv::DtOsgChannel.

DtVirtualRealityChannel& makVrv::DtVirtualRealityChannel::operator= ( const DtVirtualRealityChannel other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

Friends And Related Function Documentation

friend class DtVirtualRealityChannelCreator
friend

Member Data Documentation

boost::signalslib::signal<void()> makVrv::DtVirtualRealityChannel::signal_renderTextureChanged

signaled any time the underlying texture target changes.

Used for systems that use the texture as an input for rendering.

int makVrv::DtVirtualRealityChannel::myWidth
protected
int makVrv::DtVirtualRealityChannel::myHeight
protected
bool makVrv::DtVirtualRealityChannel::myIsMultiView
protected

is multiview being used

bool makVrv::DtVirtualRealityChannel::myMultiViewUsesAA
protected

should this channel use aa when in multiview

bool makVrv::DtVirtualRealityChannel::myIgnoreZoom
protected

should this channel ignore zoom when computing projection

osg::Vec4 makVrv::DtVirtualRealityChannel::myEyeFrustumAngles[2]
protected

store the eye frustum angles so we can more easily update the projection later

osg::ref_ptr<osg::Uniform> makVrv::DtVirtualRealityChannel::myEyeProjectionMatrixUniform
protected

projection matrix uniform for the multiview eyes, single uniform accessing an array of two mat4 values in the shader

osg::ref_ptr<osg::Uniform> makVrv::DtVirtualRealityChannel::myEyeInverseProjectionMatrixUniform
protected

inverse projection matrix uniform for the multiview eyes, single uniform accessing an array of two mat4 values in the shader

osg::ref_ptr<osg::Uniform> makVrv::DtVirtualRealityChannel::myEyeOffsetMatrixUniform
protected

view space offect matrix for the multiview eyes, single uniform accessing an array of two mat4 values in the shader

osg::ref_ptr<DtVariableRateShadingImage> makVrv::DtVirtualRealityChannel::myShadingRateImage
protected
osg::ref_ptr<DtVariableRateShadingImagePalette> makVrv::DtVirtualRealityChannel::myShadingRateImagePalette
protected

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

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)