GRE::SCENE3D Class Reference

SCENE3D class describes view scene and all transformation beetween model and world and view and unit cube and screne. More...

#include <gre/3dscene.h>

List of all members.

Public Types

enum  STEREOVIEW { STEREOVIEW_None, STEREOVIEW_Left, STEREOVIEW_Right }

Public Member Functions

bool CalculateParameters (const DRECT2D &screenrect)
void Clear ()
void ClearModelToWorld ()
bool ClipSegment (FPOINT3D &pts, FPOINT3D &pte)
float GetAzimuth () const
float GetBaseElevation () const
const FPOINT3DGetDirection () const
float GetElevation () const
float GetFieldOfViewAngle () const
const DRECT3DGetFrustum () const
const FPOINT3DGetLookAt () const
const TRANS3DGetModelToScreen () const
const TRANS3DGetModelToUnitCube () const
const TRANS3DGetModelToView () const
const TRANS3DGetModelToWorld () const
float GetParallelProjectionDistance () const
double GetPixelSizeInMeters () const
float GetRoll () const
const DRECT2DGetScreenRect () const
STEREOVIEW GetStereoView () const
float GetSunAzimuthAngle () const
float GetSunElevationAngle () const
const TRANS3DGetUnitCubeToScreen () const
const FPOINT3DGetUp () const
FPOINT3D GetViewer () const
const TRANS3DGetViewToScreen () const
const TRANS3DGetViewToUnitCube () const
const TRANS3DGetWorldToScreen () const
const TRANS3DGetWorldToUnitCube () const
const TRANS3DGetWorldToView () const
bool IsCalculated () const
bool IsPerspective () const
bool IsRectangleOverlapped (const DRECT3D &rect) const
bool IsSegmentOverlapped (const FPOINT3D &pts, const FPOINT3D &pte) const
bool IsSphereOverlapped (const FPOINT3D &center, const float radiussquared=0.0f) const
bool IsStereo () const
bool IsTriangleOverlapped (const FPOINT3D &pt1, const FPOINT3D &pt2, const FPOINT3D &pt3) const
SCENE3Doperator= (const SCENE3D &rhs)
void PrintToFile (const char *filename, const char *mode)
 SCENE3D (const float FieldOfViewAngle=45)
void SetAzimuth (const float azimuth, const bool recalculate=true)
void SetBaseElevation (const float BaseElevation)
void SetElevation (const float elevation)
void SetExtents (DOUBLE_ARRAY< DRECT3D > &extents)
void SetFieldOfViewAngle (const float FieldOfViewAngle)
void SetFrustum (const DRECT2D &frustum)
void SetLookAt (const FPOINT3D &lookAt)
void SetModelToWorld (const TRANS3D &ModelToWorld)
void SetMonitorSeparation (const double monitor)
void SetNearFarPlanes (const double nearplane, const double farplane, const bool use=false)
void SetOpticalSeparation (const double optical)
void SetParallelProjectionDistance (const float distance)
void SetPerspective (const bool isPerspective)
void SetRoll (const float roll, const bool recalculate=true)
void SetStereo (const bool isStereo)
void SetStereoDistance (const double distance)
void SetStereoMode (const STEREOMODE mode)
void SetStereoScale (const double scale)
void SetStereoView (const STEREOVIEW stereoview)
void SetSunAzimuthAngle (const float SunAzimuthAngle)
void SetSunElevationAngle (const float SunElevationAngle)
void SetViewer (const FPOINT3D &viewer)
void UpdateAzimuth (const float update)
void UpdateElevation (const float update)
void UpdateRoll (const float update)
void ViewerMoveAlongDirection (const float distance)
void ViewerUpdateZ (const float distance)
 ~SCENE3D ()

Private Types

enum  INDEX { INDEX_Left = 0, INDEX_Center = 1, INDEX_Right = 2, INDEX_Count = 3 }


Detailed Description

SCENE3D class describes view scene and all transformation beetween model and world and view and unit cube and screne.

All angles are in degrees; All distances are in meters; All points are in orthogonal coordinate system

Definition at line 110 of file 3dscene.h.


Member Enumeration Documentation

enum GRE::SCENE3D::INDEX [private]
 

Enumeration values:
INDEX_Left 
INDEX_Center 
INDEX_Right 
INDEX_Count 

Definition at line 469 of file 3dscene.h.

enum GRE::SCENE3D::STEREOVIEW
 

Enumeration values:
STEREOVIEW_None 
STEREOVIEW_Left 
STEREOVIEW_Right 

Definition at line 113 of file 3dscene.h.


Constructor & Destructor Documentation

GRE::SCENE3D::SCENE3D const float  FieldOfViewAngle = 45  ) 
 

Parameters:
FieldOfViewAngle  Constructor Destructor Constructor

GRE::SCENE3D::~SCENE3D  ) 
 


Member Function Documentation

bool GRE::SCENE3D::CalculateParameters const DRECT2D screenrect  ) 
 

Calculate scene parameters for given screen rectangle.

Returns:
true if calculation is completed

void GRE::SCENE3D::Clear  ) 
 

Clear scene parameters.

void GRE::SCENE3D::ClearModelToWorld  ) 
 

Clear Model to World transformation to identity transformation.

bool GRE::SCENE3D::ClipSegment FPOINT3D pts,
FPOINT3D pte
 

pts and pte contains endpoints of intersection in return.

Returns:
true if segment intersects frustum

float GRE::SCENE3D::GetAzimuth  )  const
 

Get azimuth angle in degrees.

Returns:
azimuth angle

float GRE::SCENE3D::GetBaseElevation  )  const
 

Retrieve base elevation.

const FPOINT3D& GRE::SCENE3D::GetDirection  )  const
 

Get view direction.

Returns:
view direction

float GRE::SCENE3D::GetElevation  )  const [inline]
 

Get elevation in meters.

Returns:
elevation in meters

Definition at line 169 of file 3dscene.h.

float GRE::SCENE3D::GetFieldOfViewAngle  )  const
 

Get field of view angle in degrees.

Returns:
field of view angle in degrees

const DRECT3D& GRE::SCENE3D::GetFrustum  )  const
 

Get frustum as DRECT3D.

Returns:
frustum sa DRECT3D

const FPOINT3D& GRE::SCENE3D::GetLookAt  )  const
 

Get look at point.

Returns:
look at point

const TRANS3D& GRE::SCENE3D::GetModelToScreen  )  const [inline]
 

Get Model to Screen transformation.

Returns:
Model to Screen transformation

Definition at line 433 of file 3dscene.h.

const TRANS3D& GRE::SCENE3D::GetModelToUnitCube  )  const [inline]
 

Get Model to UnitCube transformation.

Returns:
Model to UnitCube transformation

Definition at line 428 of file 3dscene.h.

const TRANS3D& GRE::SCENE3D::GetModelToView  )  const [inline]
 

Get Model to View transformation.

Returns:
Model to View transformation

Definition at line 423 of file 3dscene.h.

const TRANS3D& GRE::SCENE3D::GetModelToWorld  )  const [inline]
 

Get Model to World transformation.

Returns:
Model to World transformation

Definition at line 418 of file 3dscene.h.

float GRE::SCENE3D::GetParallelProjectionDistance  )  const
 

Get parallel projection distance.

Returns:
parallel projection distance

double GRE::SCENE3D::GetPixelSizeInMeters  )  const
 

Get pixel sixe in meters.

float GRE::SCENE3D::GetRoll  )  const
 

Get roll angle in degrees.

Returns:
roll angle

const DRECT2D& GRE::SCENE3D::GetScreenRect  )  const
 

Get screen rectangle.

Returns:
screen rectangle

STEREOVIEW GRE::SCENE3D::GetStereoView  )  const [inline]
 

Get stereo view.

Definition at line 215 of file 3dscene.h.

float GRE::SCENE3D::GetSunAzimuthAngle  )  const
 

float GRE::SCENE3D::GetSunElevationAngle  )  const
 

const TRANS3D& GRE::SCENE3D::GetUnitCubeToScreen  )  const [inline]
 

Get UnitCube to Screen transformation.

Returns:
UnitCube to Screen transformation

Definition at line 463 of file 3dscene.h.

const FPOINT3D& GRE::SCENE3D::GetUp  )  const
 

Get up direction.

Returns:
up direction

FPOINT3D GRE::SCENE3D::GetViewer  )  const
 

Get viewer point.

Returns:
viewer point

const TRANS3D& GRE::SCENE3D::GetViewToScreen  )  const [inline]
 

Get View to Screen transformation.

Returns:
View to Screen transformation

Definition at line 458 of file 3dscene.h.

const TRANS3D& GRE::SCENE3D::GetViewToUnitCube  )  const [inline]
 

Get View to UnitCube transformation.

Returns:
View to UnitCube transformation

Definition at line 453 of file 3dscene.h.

const TRANS3D& GRE::SCENE3D::GetWorldToScreen  )  const [inline]
 

Get World to Screen transformation.

Returns:
World to Screen transformation

Definition at line 448 of file 3dscene.h.

const TRANS3D& GRE::SCENE3D::GetWorldToUnitCube  )  const [inline]
 

Get World to UnitCube transformation.

Returns:
World to UnitCube transformation

Definition at line 443 of file 3dscene.h.

const TRANS3D& GRE::SCENE3D::GetWorldToView  )  const [inline]
 

Get World to View transformation.

Returns:
World to View transformation

Definition at line 438 of file 3dscene.h.

bool GRE::SCENE3D::IsCalculated  )  const
 

Are scene parameters calculated.

Returns:
true if scene parameters are calculated

bool GRE::SCENE3D::IsPerspective  )  const
 

Is projection perspective.

Returns:
true if projecton is perspective

bool GRE::SCENE3D::IsRectangleOverlapped const DRECT3D rect  )  const
 

Is given rectangle overlapped with scene frustum.

Returns:
true if rectangle is overlapped

bool GRE::SCENE3D::IsSegmentOverlapped const FPOINT3D pts,
const FPOINT3D pte
const
 

Is segment with given endpoints overlapped with scene frustum.

Returns:
true if segement is overlapped

bool GRE::SCENE3D::IsSphereOverlapped const FPOINT3D center,
const float  radiussquared = 0.0f
const
 

Is sphere with given center and given radius overlapped with scene frustum.

Returns:
true if sphere is overlapped

bool GRE::SCENE3D::IsStereo  )  const
 

Is stereo set.

Returns:
true if stereo is set

bool GRE::SCENE3D::IsTriangleOverlapped const FPOINT3D pt1,
const FPOINT3D pt2,
const FPOINT3D pt3
const
 

Is triangle with given vertices overlapped with scene frustum.

Returns:
true if triangle is overlapped

SCENE3D& GRE::SCENE3D::operator= const SCENE3D rhs  ) 
 

Parameters:
rhs  Destructor

void GRE::SCENE3D::PrintToFile const char *  filename,
const char *  mode
 

void GRE::SCENE3D::SetAzimuth const float  azimuth,
const bool  recalculate = true
 

Set azimuth angle in degrees.

void GRE::SCENE3D::SetBaseElevation const float  BaseElevation  ) 
 

Set base elevation in meters.

void GRE::SCENE3D::SetElevation const float  elevation  ) 
 

Set elevation angle in degrees.

void GRE::SCENE3D::SetExtents DOUBLE_ARRAY< DRECT3D > &  extents  ) 
 

Set clipping extents for scene.

void GRE::SCENE3D::SetFieldOfViewAngle const float  FieldOfViewAngle  ) 
 

Set field of view angle in degrees.

void GRE::SCENE3D::SetFrustum const DRECT2D frustum  ) 
 

Set frustum as DRECT2D.

void GRE::SCENE3D::SetLookAt const FPOINT3D lookAt  ) 
 

Set look at point.

void GRE::SCENE3D::SetModelToWorld const TRANS3D ModelToWorld  ) 
 

Get Model to World transformation.

void GRE::SCENE3D::SetMonitorSeparation const double  monitor  ) 
 

void GRE::SCENE3D::SetNearFarPlanes const double  nearplane,
const double  farplane,
const bool  use = false
 

Get near and far planes.

void GRE::SCENE3D::SetOpticalSeparation const double  optical  ) 
 

void GRE::SCENE3D::SetParallelProjectionDistance const float  distance  ) 
 

Set parallel projection distance.

void GRE::SCENE3D::SetPerspective const bool  isPerspective  ) 
 

Set perspective projection on or off.

void GRE::SCENE3D::SetRoll const float  roll,
const bool  recalculate = true
 

Set roll angle in degrees.

void GRE::SCENE3D::SetStereo const bool  isStereo  ) 
 

Set stereo on or off.

void GRE::SCENE3D::SetStereoDistance const double  distance  ) 
 

void GRE::SCENE3D::SetStereoMode const STEREOMODE  mode  ) 
 

void GRE::SCENE3D::SetStereoScale const double  scale  ) 
 

void GRE::SCENE3D::SetStereoView const STEREOVIEW  stereoview  ) 
 

void GRE::SCENE3D::SetSunAzimuthAngle const float  SunAzimuthAngle  ) 
 

void GRE::SCENE3D::SetSunElevationAngle const float  SunElevationAngle  ) 
 

void GRE::SCENE3D::SetViewer const FPOINT3D viewer  ) 
 

Set viewer point.

void GRE::SCENE3D::UpdateAzimuth const float  update  ) 
 

Update azimuth angle in degrees.

void GRE::SCENE3D::UpdateElevation const float  update  ) 
 

Update elevation in meters.

void GRE::SCENE3D::UpdateRoll const float  update  ) 
 

Update roll angle in degrees.

void GRE::SCENE3D::ViewerMoveAlongDirection const float  distance  ) 
 

Move viewer point along view direction.

void GRE::SCENE3D::ViewerUpdateZ const float  distance  ) 
 

Update viewer point z coordinate.


The documentation for this class was generated from the following file:
Generated on Wed May 31 15:29:35 2006 for TNTsdk by  doxygen 1.3.8-20040913