Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Projector Class Reference

#include <Projector.h>

List of all members.

Public Member Functions

 Projector (Window *win, Camera *cam)
virtual ~Projector ()
virtual void UseWindow (Window *win)
virtual void UseCamera (Camera *cam)
virtual void SetDepthScale (float scale)
virtual double GetDepthScale () const
virtual void SetFieldOfView (double fov)
virtual double GetFieldOfView () const
virtual int SetInfinite (int i)
virtual void StartFrame ()
Point Pos () const
Point vrt ()
Point vup ()
Point vpn ()
const MatrixOrientation () const
double XAngle () const
double YAngle () const
bool IsOrthogonal () const
void SetOrthogonal (bool o)
virtual void Transform (Vec3 &vec) const
virtual void Transform (Point &point) const
virtual void Project (Vec3 &vec, bool clamp=true) const
virtual void Project (Point &point, bool clamp=true) const
virtual void ProjectRect (Point &origin, double &w, double &h) const
virtual float ProjectRadius (const Vec3 &vec, float radius) const
virtual void Unproject (Point &point) const
int IsVisible (const Vec3 &v, float radius) const
int IsBoxVisible (const Point *p) const
float ApparentRadius (const Vec3 &v, float radius) const
virtual void SetWorldSpace ()
virtual void SetViewSpace ()
PlaneGetCurrentClipPlanes ()
void SetUpFrustum ()
void ViewToWorld (Point &pin, Point &pout)
void ViewToWorld (Vec3 &vin, Vec3 &vout)
void SetWorldspaceClipPlane (Vec3 &normal, Plane &plane)

Protected Types

enum  DISPLAY_CONST { NUM_FRUSTUM_PLANES = 4 }

Protected Attributes

Cameracamera
int width
int height
double field_of_view
double xscreenscale
double yscreenscale
double maxscale
double xcenter
double ycenter
double xangle
double yangle
int infinite
float depth_scale
bool orthogonal
Planefrustum_planes
Plane world_planes [NUM_FRUSTUM_PLANES]
Plane view_planes [NUM_FRUSTUM_PLANES]
float xclip0
float xclip1
float yclip0
float yclip1

Detailed Description

Definition at line 25 of file Projector.h.


Member Enumeration Documentation

enum Projector::DISPLAY_CONST
protected
Enumerator:
NUM_FRUSTUM_PLANES 

Definition at line 93 of file Projector.h.


Constructor & Destructor Documentation

Projector::Projector ( Window win,
Camera cam 
)

Definition at line 31 of file Projector.cpp.

Projector::~Projector ( )
virtual

Definition at line 40 of file Projector.cpp.


Member Function Documentation

float Projector::ApparentRadius ( const Vec3 v,
float  radius 
) const

Definition at line 440 of file Projector.cpp.

Plane* Projector::GetCurrentClipPlanes ( )
inline

Definition at line 73 of file Projector.h.

double Projector::GetDepthScale ( ) const
virtual

Definition at line 99 of file Projector.cpp.

double Projector::GetFieldOfView ( ) const
virtual

Definition at line 87 of file Projector.cpp.

int Projector::IsBoxVisible ( const Point p) const

Definition at line 402 of file Projector.cpp.

bool Projector::IsOrthogonal ( ) const
inline

Definition at line 51 of file Projector.h.

int Projector::IsVisible ( const Vec3 v,
float  radius 
) const

Definition at line 368 of file Projector.cpp.

const Matrix& Projector::Orientation ( ) const
inline

Definition at line 46 of file Projector.h.

Point Projector::Pos ( ) const
inline

Definition at line 42 of file Projector.h.

void Projector::Project ( Vec3 vec,
bool  clamp = true 
) const
virtual

Definition at line 185 of file Projector.cpp.

void Projector::Project ( Point point,
bool  clamp = true 
) const
virtual

Definition at line 223 of file Projector.cpp.

float Projector::ProjectRadius ( const Vec3 vec,
float  radius 
) const
virtual

Definition at line 172 of file Projector.cpp.

void Projector::ProjectRect ( Point origin,
double &  w,
double &  h 
) const
virtual

Definition at line 281 of file Projector.cpp.

void Projector::SetDepthScale ( float  scale)
virtual

Definition at line 93 of file Projector.cpp.

void Projector::SetFieldOfView ( double  fov)
virtual

Definition at line 73 of file Projector.cpp.

int Projector::SetInfinite ( int  i)
virtual

Definition at line 105 of file Projector.cpp.

void Projector::SetOrthogonal ( bool  o)
inline

Definition at line 52 of file Projector.h.

void Projector::SetUpFrustum ( )

Definition at line 320 of file Projector.cpp.

virtual void Projector::SetViewSpace ( )
inlinevirtual

Definition at line 71 of file Projector.h.

virtual void Projector::SetWorldSpace ( )
inlinevirtual

Definition at line 70 of file Projector.h.

void Projector::SetWorldspaceClipPlane ( Vec3 normal,
Plane plane 
)

Definition at line 308 of file Projector.cpp.

void Projector::StartFrame ( )
virtual

Definition at line 115 of file Projector.cpp.

void Projector::Transform ( Vec3 vec) const
virtual

Definition at line 126 of file Projector.cpp.

void Projector::Transform ( Point point) const
virtual

Definition at line 148 of file Projector.cpp.

void Projector::Unproject ( Point point) const
virtual

Definition at line 258 of file Projector.cpp.

void Projector::UseCamera ( Camera cam)
virtual

Definition at line 46 of file Projector.cpp.

void Projector::UseWindow ( Window win)
virtual

Definition at line 55 of file Projector.cpp.

void Projector::ViewToWorld ( Point pin,
Point pout 
)

Definition at line 454 of file Projector.cpp.

void Projector::ViewToWorld ( Vec3 vin,
Vec3 vout 
)

Definition at line 463 of file Projector.cpp.

Point Projector::vpn ( )
inline

Definition at line 45 of file Projector.h.

Point Projector::vrt ( )
inline

Definition at line 43 of file Projector.h.

Point Projector::vup ( )
inline

Definition at line 44 of file Projector.h.

double Projector::XAngle ( ) const
inline

Definition at line 48 of file Projector.h.

double Projector::YAngle ( ) const
inline

Definition at line 49 of file Projector.h.


Member Data Documentation

Camera* Projector::camera
protected

Definition at line 81 of file Projector.h.

float Projector::depth_scale
protected

Definition at line 90 of file Projector.h.

double Projector::field_of_view
protected

Definition at line 84 of file Projector.h.

Plane* Projector::frustum_planes
protected

Definition at line 97 of file Projector.h.

int Projector::height
protected

Definition at line 83 of file Projector.h.

int Projector::infinite
protected

Definition at line 89 of file Projector.h.

double Projector::maxscale
protected

Definition at line 85 of file Projector.h.

bool Projector::orthogonal
protected

Definition at line 91 of file Projector.h.

Plane Projector::view_planes[NUM_FRUSTUM_PLANES]
protected

Definition at line 99 of file Projector.h.

int Projector::width
protected

Definition at line 83 of file Projector.h.

Plane Projector::world_planes[NUM_FRUSTUM_PLANES]
protected

Definition at line 98 of file Projector.h.

double Projector::xangle
protected

Definition at line 87 of file Projector.h.

double Projector::xcenter
protected

Definition at line 86 of file Projector.h.

float Projector::xclip0
protected

Definition at line 101 of file Projector.h.

float Projector::xclip1
protected

Definition at line 101 of file Projector.h.

double Projector::xscreenscale
protected

Definition at line 85 of file Projector.h.

double Projector::yangle
protected

Definition at line 87 of file Projector.h.

double Projector::ycenter
protected

Definition at line 86 of file Projector.h.

float Projector::yclip0
protected

Definition at line 102 of file Projector.h.

float Projector::yclip1
protected

Definition at line 102 of file Projector.h.

double Projector::yscreenscale
protected

Definition at line 85 of file Projector.h.


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