PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLScene::VisNode Class Reference

Node of the visibility tree. More...

#include <VisNode.h>

Inheritance diagram for PLScene::VisNode:
Inheritance graph
[legend]

List of all members.

Public Member Functions

PLS_API const VisContainerGetVisRootContainer () const
 Returns the visibility root container.
PLS_API const VisNodeGetParent () const
 Returns the parent visibility node.
PLS_API SceneNodeGetSceneNode () const
 Returns the scene node this visibility node links to.
PLS_API const PLMath::Matrix4x4GetProjectionMatrix () const
 Returns the used projection matrix.
PLS_API const PLMath::Matrix4x4GetViewMatrix () const
 Returns the used view matrix.
PLS_API const PLMath::Matrix4x4GetViewProjectionMatrix () const
 Returns the used view projection matrix.
PLS_API const PLMath::Matrix3x4GetWorldMatrix () const
 Returns the absolute world matrix of the scene node.
void SetWorldMatrix (const PLMath::Matrix3x4 &mWorld)
PLS_API const PLMath::Matrix3x4GetInverseWorldMatrix () const
 Returns the absolute inverse world matrix of the scene node.
PLS_API const PLMath::Matrix4x4GetWorldViewMatrix () const
 Returns the absolute world view matrix of the scene node.
PLS_API const PLMath::Matrix4x4GetWorldViewProjectionMatrix () const
 Returns the absolute world view projection matrix of the scene node.
PLS_API float GetSquaredDistanceToCamera () const
 Returns the squared distance to the camera.
virtual PLS_API bool IsContainer () const
 Returns whether or not this is a container visibility node (VisContainer, links to a SceneContainer scene node)
virtual PLS_API bool IsCell () const
 Returns whether or not this is a cell visibility node (VisContainer, links to a SNCell scene node)
virtual PLS_API bool IsPortal () const
 Returns whether or not this is a portal visibility node (VisPortal, links to a SNCellPortal scene node)

Protected Member Functions

 VisNode (VisNode *pParent=nullptr)
 Constructor.
virtual ~VisNode ()
 Destructor.

Detailed Description

Node of the visibility tree.


Constructor & Destructor Documentation

PLScene::VisNode::VisNode ( VisNode pParent = nullptr) [protected]

Constructor.

Parameters:
[in]pParentThe parent visibility node, a null pointer if this is the root
virtual PLScene::VisNode::~VisNode ( ) [protected, virtual]

Destructor.


Member Function Documentation

Returns the visibility root container.

Returns:
The visibility root container, a null pointer on error
PLS_API const VisNode* PLScene::VisNode::GetParent ( ) const

Returns the parent visibility node.

Returns:
The parent visibility node, a null pointer if this is the root
Remarks:
The parent visibility node can be a VisContainer or a VisPortal. If the parent is a portal, this visibility node is the cell it links to.

Returns the scene node this visibility node links to.

Returns:
The scene node this visibility node links to, a null pointer if there's no scene node linked to this visibility node (maybe the scene node this visibility node was linked to was killed?)

Returns the used projection matrix.

Returns:
The used projection matrix

Returns the used view matrix.

Returns:
The used view matrix

Returns the used view projection matrix.

Returns:
The used view projection matrix

Returns the absolute world matrix of the scene node.

Returns:
The absolute world matrix of the scene node
Remarks:
If the camera is within a container, this world matrix is relative to the container the camera is in.

Returns the absolute inverse world matrix of the scene node.

Returns:
The absolute inverse world matrix of the scene node
Remarks:
If the camera is within a container, this world matrix is relative to the container the camera is in.

Returns the absolute world view matrix of the scene node.

Returns:
The absolute world view matrix of the scene node
Remarks:
You can use for example Matrix4x4 mWorldViewProjection(cRenderer.GetTransformState(Transform::View)); mWorldViewProjection *= pVisNode->GetWorldMatrix(); to calculate the matrix by yourself. But for instance a advanced per pixel lighting scene renderer may need this final matrix of the node multiple times per frame, so, it's recommended to use this precalculated one.

Returns the absolute world view projection matrix of the scene node.

Returns:
The absolute world view projection matrix of the scene node
Remarks:
You can use for example Matrix4x4 mWorldViewProjection(cRenderer.GetTransformState(Transform::Projection)); mWorldViewProjection *= cRenderer.GetTransformState(Transform::View); mWorldViewProjection *= pVisNode->GetWorldMatrix(); to calculate the matrix by yourself. But for instance a advanced per pixel lighting scene renderer may need this final matrix of the node multiple times per frame, so, it's recommended to use this precalculated one.

Returns the squared distance to the camera.

Returns:
The squared distance to the camera
virtual PLS_API bool PLScene::VisNode::IsContainer ( ) const [virtual]

Returns whether or not this is a container visibility node (VisContainer, links to a SceneContainer scene node)

Returns:
'true' if this is a container visibility node, else 'false'

Reimplemented in PLScene::VisContainer.

virtual PLS_API bool PLScene::VisNode::IsCell ( ) const [virtual]

Returns whether or not this is a cell visibility node (VisContainer, links to a SNCell scene node)

Returns:
'true' if this is a cell visibility node, else 'false'

Reimplemented in PLScene::VisContainer.

virtual PLS_API bool PLScene::VisNode::IsPortal ( ) const [virtual]

Returns whether or not this is a portal visibility node (VisPortal, links to a SNCellPortal scene node)

Returns:
'true' if this is a portal visibility node, else 'false'

Reimplemented in PLScene::VisPortal.


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


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:26
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported