Main Page   Class Hierarchy   Compound List   File List   Compound Members  

iCamera Struct Reference

Camera class. More...

#include <camera.h>

Inheritance diagram for iCamera:

iBase List of all members.

Public Methods

virtual csCameraGetPrivateObject ()=0
 Ugly@. More...

virtual int GetFOV () const=0
virtual float GetInvFOV () const=0
virtual float GetFOVAngle () const=0
virtual void SetFOV (int a, int width)=0
virtual void SetFOVAngle (float a, int width)=0
virtual float GetShiftX () const=0
virtual float GetShiftY () const=0
virtual void SetPerspectiveCenter (float x, float y)=0
virtual csOrthoTransformGetTransform ()=0
 Get the transform corresponding to this camera. More...

virtual void SetTransform (const csOrthoTransform &tr)=0
 Set the transform corresponding to this camera. More...

virtual void MoveWorld (const csVector3 &v, bool cd=true)=0
 Moves the camera a relative amount in world coordinates. More...

virtual void Move (const csVector3 &v, bool cd=true)=0
 Moves the camera a relative amount in camera coordinates.

virtual void MoveWorldUnrestricted (const csVector3 &v)=0
 Moves the camera a relative amount in world coordinates, ignoring portals and walls. More...

virtual void MoveUnrestricted (const csVector3 &v)=0
 Moves the camera a relative amount in camera coordinates, ignoring portals and walls. More...

virtual iSectorGetSector () const=0
 Get the current sector.

virtual void SetSector (iSector *)=0
 Move to another sector.

virtual void Correct (int n)=0
 Eliminate roundoff error by snapping the camera orientation to a grid of density n.

virtual bool IsMirrored () const=0
 Return true if space is mirrored.

virtual void SetMirrored (bool m)=0
 Set mirrored state.

virtual bool GetFarPlane (csPlane3 &pl) const=0
 Get the 3D far plane that should be used to clip all geometry. More...

virtual long GetCameraNumber () const=0
 Get the camera number. More...

virtual void Perspective (const csVector3 &v, csVector2 &p) const=0
 Calculate perspective corrected point for this camera.

virtual void InvPerspective (const csVector2 &p, float z, csVector3 &v) const=0
 Calculate inverse perspective corrected point for this camera.

virtual void OnlyPortals (bool hop)=0
 If the hit-only-portals flag is true then only portals will be checked with the 'MoveWorld()' function. More...

virtual bool GetOnlyPortals ()=0
 Get the hit-only-portals flag.


Detailed Description

Camera class.


Member Function Documentation

long iCamera::GetCameraNumber ( ) const [pure virtual]
 

Get the camera number.

This number is changed for every new camera instance and it is also updated whenever the camera transformation changes. This number can be used to cache camera vertex arrays, for example.

bool iCamera::GetFarPlane ( csPlane3 & pl ) const [pure virtual]
 

Get the 3D far plane that should be used to clip all geometry.

If this function returns false then this plane is invalid and should not be used. Otherwise it must be used to clip the object before drawing.

csCamera * iCamera::GetPrivateObject ( ) [pure virtual]
 

Ugly@.

@

csOrthoTransform & iCamera::GetTransform ( ) [pure virtual]
 

Get the transform corresponding to this camera.

In this transform, 'other' is world space and 'this' is camera space. WARNING! It is illegal to directly assign to the given transform in order to modify it. To change the entire transform you have to use SetTransform(). Note that it is legal to modify the returned transform otherwise. Just do not assign to it.

void iCamera::MoveUnrestricted ( const csVector3 & v ) [pure virtual]
 

Moves the camera a relative amount in camera coordinates, ignoring portals and walls.

This is used by the wireframe class. In general this is useful by any camera model that doesn't want to restrict its movement by portals and sector boundaries.

void iCamera::MoveWorld ( const csVector3 & v,
bool cd = true ) [pure virtual]
 

Moves the camera a relative amount in world coordinates.

If 'cd' is true then collision detection with objects and things inside the sector is active. Otherwise you can walk through objects (but portals will still be correctly checked).

void iCamera::MoveWorldUnrestricted ( const csVector3 & v ) [pure virtual]
 

Moves the camera a relative amount in world coordinates, ignoring portals and walls.

This is used by the wireframe class. In general this is useful by any camera model that doesn't want to restrict its movement by portals and sector boundaries.

void iCamera::OnlyPortals ( bool hop ) [pure virtual]
 

If the hit-only-portals flag is true then only portals will be checked with the 'MoveWorld()' function.

This is a lot faster but it does mean that you will have to do collision detection with non-portal polygons using another technique. The default for this flag is true.

void iCamera::SetTransform ( const csOrthoTransform & tr ) [pure virtual]
 

Set the transform corresponding to this camera.

In this transform, 'other' is world space and 'this' is camera space.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.5 written by Dimitri van Heesch, ©1997-2000