|
Revision 2828, 2.5 kB
(checked in by patrickh, 8 years ago)
|
Updated the copyright to what ISU's lawyers decided they want now.
The vast majority of this was done using Kevin's auto-copyright.pl script
which definitely made this easier. All the copyright blocks now have
begin and end tags so that if and when we have to update the copyright
information again, it will be even simpler.
|
- Property svn:eol-style set to
native
- Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 |
|
|---|
| 24 |
|
|---|
| 25 |
|
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
|
|---|
| 32 |
|
|---|
| 33 |
|
|---|
| 34 |
#ifndef _VJ_CAMERA_PROJECTION_H_ |
|---|
| 35 |
#define _VJ_CAMERA_PROJECTION_H_ |
|---|
| 36 |
|
|---|
| 37 |
#include <vjConfig.h> |
|---|
| 38 |
#include <Kernel/vjProjection.h> |
|---|
| 39 |
class vjMatrix; |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
|
|---|
| 43 |
class vjCameraProjection : public vjProjection |
|---|
| 44 |
{ |
|---|
| 45 |
public: |
|---|
| 46 |
vjCameraProjection() |
|---|
| 47 |
{ |
|---|
| 48 |
mType = vjProjection::SIM; |
|---|
| 49 |
} |
|---|
| 50 |
|
|---|
| 51 |
virtual void config(vjConfigChunk* chunk) |
|---|
| 52 |
{ |
|---|
| 53 |
vjProjection::config(chunk); |
|---|
| 54 |
|
|---|
| 55 |
vjASSERT((std::string)chunk->getType() == std::string("simDisplay")); |
|---|
| 56 |
|
|---|
| 57 |
|
|---|
| 58 |
mVertFOV = chunk->getProperty("vert_fov"); |
|---|
| 59 |
if(mVertFOV == 0.0f) |
|---|
| 60 |
mVertFOV = 60.0f; |
|---|
| 61 |
mAspectRatio = chunk->getProperty("aspect_ratio"); |
|---|
| 62 |
if(mAspectRatio == 0.0f) |
|---|
| 63 |
mAspectRatio = 1.0f; |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
virtual void calcViewMatrix(vjMatrix& cameraPos) |
|---|
| 67 |
{ |
|---|
| 68 |
mViewMat = cameraPos; |
|---|
| 69 |
|
|---|
| 70 |
mFrustum.set(-0.6f, 0.6f, -0.6f, 0.6f, mNearDist, mFarDist); |
|---|
| 71 |
} |
|---|
| 72 |
|
|---|
| 73 |
virtual std::ostream& outStream(std::ostream& out) |
|---|
| 74 |
{ |
|---|
| 75 |
out << "vjCameraProjection:\n"; |
|---|
| 76 |
return out; |
|---|
| 77 |
} |
|---|
| 78 |
|
|---|
| 79 |
public: |
|---|
| 80 |
float mAspectRatio; |
|---|
| 81 |
float mVertFOV; |
|---|
| 82 |
}; |
|---|
| 83 |
|
|---|
| 84 |
#endif |
|---|