Vegastrike 0.5.1 rc1  1.0
Original sources for Vegastrike Evolved
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
IdentityTransform Class Reference

#include <nonlinear_transform.h>

Inheritance diagram for IdentityTransform:
SphericalTransform

Public Member Functions

virtual QVector Transform (const QVector &v) const
 Transforms in a possibly nonlinear way the point to some new space. More...
 
virtual QVector TransformNormal (const QVector &v, const QVector &n) const
 transforms a direction to some new space More...
 
virtual QVector InvTransform (const QVector &v) const
 Transforms in reverse the vector into quadsquare space. More...
 
virtual CLIPSTATE BoxInFrustum (Vector &min, Vector &max, const Vector &campos) const
 Transforms a min and a max vector and figures out what is bigger. More...
 
float TransformS (float x, float scale) const
 
float TransformT (float y, float scale) const
 

Detailed Description

We could make it virtual and ahve a sphere-map or cube-map version of this

Definition at line 12 of file nonlinear_transform.h.

Member Function Documentation

virtual CLIPSTATE IdentityTransform::BoxInFrustum ( Vector min,
Vector max,
const Vector campos 
) const
inlinevirtual

Transforms a min and a max vector and figures out what is bigger.

Reimplemented in SphericalTransform.

Definition at line 31 of file nonlinear_transform.h.

References GFXBoxInFrustum().

32  {
33  return GFXBoxInFrustum( min, max );
34  }
virtual QVector IdentityTransform::InvTransform ( const QVector v) const
inlinevirtual

Transforms in reverse the vector into quadsquare space.

Reimplemented in SphericalTransform.

Definition at line 26 of file nonlinear_transform.h.

References v.

Referenced by QuadTree::GetGroundPos(), QuadTree::GetHeight(), QuadTree::Render(), and QuadTree::Update().

27  {
28  return v;
29  }
virtual QVector IdentityTransform::Transform ( const QVector v) const
inlinevirtual

Transforms in a possibly nonlinear way the point to some new space.

Reimplemented in SphericalTransform.

Definition at line 16 of file nonlinear_transform.h.

References v.

Referenced by QuadTree::GetGroundPos().

17  {
18  return v;
19  }
virtual QVector IdentityTransform::TransformNormal ( const QVector v,
const QVector n 
) const
inlinevirtual

transforms a direction to some new space

Reimplemented in SphericalTransform.

Definition at line 21 of file nonlinear_transform.h.

Referenced by QuadTree::GetGroundPos(), QuadTree::GetHeight(), QuadTree::GetNormal(), and quadsquare::MakeLightness().

22  {
23  return n;
24  }
float IdentityTransform::TransformS ( float  x,
float  scale 
) const
inline

Definition at line 35 of file nonlinear_transform.h.

36  {
37  return x*scale;
38  }
float IdentityTransform::TransformT ( float  y,
float  scale 
) const
inline

Definition at line 39 of file nonlinear_transform.h.

40  {
41  return y*scale;
42  }

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