QVR 4.1.0
A library to build Virtual Reality applications
Loading...
Searching...
No Matches
QVRFrustum Class Reference

Frustum class. More...

#include <frustum.hpp>

Public Member Functions

 QVRFrustum ()
 Constructs an invalid frustum, where all values are zero.
 
 QVRFrustum (float l, float r, float b, float t, float n, float f)
 Constructs a view frustum.
 
 QVRFrustum (const float *lrbtnf)
 Constructs a view frustum.
 
void getClippingPlanes (float *l, float *r, float *b, float *t, float *n, float *f) const
 Returns the clipping plane values l, r, b, t, n, f.
 
void getClippingPlanes (float *lrbtnf) const
 Returns the clipping plane values l, r, b, t, n, f in an array lrbtnf.
 
QMatrix4x4 toMatrix4x4 () const
 Creates a 4x4 matrix from this frustum.
 
void adjustNearPlane (float n)
 Adjusts the near plane while preserving the frustum shape.
 
float leftPlane () const
 Returns the left clipping plane.
 
float rightPlane () const
 Returns the right clipping plane.
 
float bottomPlane () const
 Returns the bottom clipping plane.
 
float topPlane () const
 Returns the top clipping plane.
 
float nearPlane () const
 Returns the near clipping plane.
 
float farPlane () const
 Returns the far clipping plane.
 
void setLeftPlane (float l)
 Sets the left clipping plane.
 
void setRightPlane (float r)
 Sets the right clipping plane.
 
void setBottomPlane (float b)
 Sets the bottom clipping plane.
 
void setTopPlane (float t)
 Sets the top clipping plane.
 
void setNearPlane (float n)
 Sets the near clipping plane.
 
void setFarPlane (float f)
 Sets the far clipping plane.
 

Friends

QDataStream & operator<< (QDataStream &ds, const QVRFrustum &f)
 Writes the frustum f to the stream ds.
 
QDataStream & operator>> (QDataStream &ds, QVRFrustum &f)
 Reads the frustum f from the stream ds.
 

Detailed Description

Frustum class.

This class represents a view frustum.

Constructor & Destructor Documentation

◆ QVRFrustum() [1/3]

QVRFrustum::QVRFrustum ( )

Constructs an invalid frustum, where all values are zero.

◆ QVRFrustum() [2/3]

QVRFrustum::QVRFrustum ( float l,
float r,
float b,
float t,
float n,
float f )

Constructs a view frustum.

Parameters
lLeft clipping plane
rRight clipping plane
bBottom clipping plane
tTop clipping plane
nNear clipping plane
fFar clipping plane

◆ QVRFrustum() [3/3]

QVRFrustum::QVRFrustum ( const float * lrbtnf)

Constructs a view frustum.

Parameters
lrbtnfLeft, right, bottom, top, near, and far clipping plane

Member Function Documentation

◆ adjustNearPlane()

void QVRFrustum::adjustNearPlane ( float n)

Adjusts the near plane while preserving the frustum shape.

Parameters
nThe new near clipping plane

◆ bottomPlane()

float QVRFrustum::bottomPlane ( ) const
inline

Returns the bottom clipping plane.

Returns
The bottom clipping plane

◆ farPlane()

float QVRFrustum::farPlane ( ) const
inline

Returns the far clipping plane.

Returns
The far clipping plane

◆ getClippingPlanes() [1/2]

void QVRFrustum::getClippingPlanes ( float * l,
float * r,
float * b,
float * t,
float * n,
float * f ) const
inline

Returns the clipping plane values l, r, b, t, n, f.

◆ getClippingPlanes() [2/2]

void QVRFrustum::getClippingPlanes ( float * lrbtnf) const
inline

Returns the clipping plane values l, r, b, t, n, f in an array lrbtnf.

◆ leftPlane()

float QVRFrustum::leftPlane ( ) const
inline

Returns the left clipping plane.

Returns
The left clipping plane

◆ nearPlane()

float QVRFrustum::nearPlane ( ) const
inline

Returns the near clipping plane.

Returns
The near clipping plane

◆ rightPlane()

float QVRFrustum::rightPlane ( ) const
inline

Returns the right clipping plane.

Returns
The right clipping plane

◆ setBottomPlane()

void QVRFrustum::setBottomPlane ( float b)
inline

Sets the bottom clipping plane.

Parameters
bThe bottom clipping plane

◆ setFarPlane()

void QVRFrustum::setFarPlane ( float f)
inline

Sets the far clipping plane.

Parameters
fThe far clipping plane

◆ setLeftPlane()

void QVRFrustum::setLeftPlane ( float l)
inline

Sets the left clipping plane.

Parameters
lThe left clipping plane

◆ setNearPlane()

void QVRFrustum::setNearPlane ( float n)
inline

Sets the near clipping plane.

Parameters
nThe near clipping plane

◆ setRightPlane()

void QVRFrustum::setRightPlane ( float r)
inline

Sets the right clipping plane.

Parameters
rThe right clipping plane

◆ setTopPlane()

void QVRFrustum::setTopPlane ( float t)
inline

Sets the top clipping plane.

Parameters
tThe top clipping plane

◆ toMatrix4x4()

QMatrix4x4 QVRFrustum::toMatrix4x4 ( ) const

Creates a 4x4 matrix from this frustum.

Returns
The matrix

◆ topPlane()

float QVRFrustum::topPlane ( ) const
inline

Returns the top clipping plane.

Returns
The top clipping plane

Friends And Related Symbol Documentation

◆ operator<<

QDataStream & operator<< ( QDataStream & ds,
const QVRFrustum & f )
friend

Writes the frustum f to the stream ds.

◆ operator>>

QDataStream & operator>> ( QDataStream & ds,
QVRFrustum & f )
friend

Reads the frustum f from the stream ds.


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