#include <splines.h>
Public Member Functions | |
| float | getFOV (long t) |
| float | getFOV (long t) |
| idCameraFOV (int s, int e, long t) | |
| idCameraFOV (int v) | |
| idCameraFOV () | |
| idCameraFOV (int s, int e, long t) | |
| idCameraFOV (int v) | |
| idCameraFOV () | |
| void | parse (const char *(*text)) |
| void | parse (const char *(*text)) |
| void | setFOV (float f) |
| void | setFOV (float f) |
| int | start (long t) |
| void | start (long t) |
| void | write (fileHandle_t file, const char *name) |
| void | write (fileHandle_t file, const char *name) |
| ~idCameraFOV () | |
| ~idCameraFOV () | |
Protected Attributes | |
| float | endFOV |
| float | fov |
| float | startFOV |
| int | startTime |
| int | time |
|
|
Definition at line 683 of file splines.h. References time().
|
Here is the call graph for this function:

|
|
Definition at line 688 of file splines.h. References time().
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 693 of file splines.h. References time().
|
Here is the call graph for this function:

|
|
Definition at line 700 of file splines.h. 00700 {}
|
|
|
Definition at line 690 of file splines.h. References time().
|
Here is the call graph for this function:

|
|
Definition at line 695 of file splines.h. References time().
|
Here is the call graph for this function:

|
||||||||||||||||
|
Definition at line 700 of file splines.h. References time().
|
Here is the call graph for this function:

|
|
Definition at line 707 of file splines.h. 00707 {}
|
|
|
Definition at line 713 of file splines.h. References assert, startTime, and t. 00713 {
00714 if (time) {
00715 assert(startTime);
00716 float percent = t / startTime;
00717 float temp = startFOV - endFOV;
00718 temp *= percent;
00719 fov = startFOV + temp;
00720 }
00721 return fov;
00722 }
|
|
|
Definition at line 706 of file splines.h. References assert, startTime, and t. Referenced by idCameraDef::getCameraInfo(). 00706 {
00707 if (time) {
00708 assert(startTime);
00709 float percent = t / startTime;
00710 float temp = startFOV - endFOV;
00711 temp *= percent;
00712 fov = startFOV + temp;
00713 }
00714 return fov;
00715 }
|
|
|
|
|
|
Definition at line 912 of file splines.cpp. References atof(), atoi, idStr::c_str(), Com_MatchToken(), Com_Parse(), Com_ParseOnLine(), Com_UngetToken(), endFOV, fov, Q_stricmp(), startFOV, strcmp(), time, and token. Referenced by idCameraDef::parse(). 00912 {
00913 const char *token;
00914 Com_MatchToken( text, "{" );
00915 do {
00916 token = Com_Parse( text );
00917
00918 if ( !token[0] ) {
00919 break;
00920 }
00921 if ( !strcmp (token, "}") ) {
00922 break;
00923 }
00924
00925 // here we may have to jump over brush epairs ( only used in editor )
00926 do {
00927 // if token is not a brace, it is a key for a key/value pair
00928 if ( !token[0] || !strcmp (token, "(") || !strcmp(token, "}")) {
00929 break;
00930 }
00931
00932 Com_UngetToken();
00933 idStr key = Com_ParseOnLine(text);
00934 const char *token = Com_Parse(text);
00935 if (Q_stricmp(key.c_str(), "fov") == 0) {
00936 fov = atof(token);
00937 } else if (Q_stricmp(key.c_str(), "startFOV") == 0) {
00938 startFOV = atof(token);
00939 } else if (Q_stricmp(key.c_str(), "endFOV") == 0) {
00940 endFOV = atof(token);
00941 } else if (Q_stricmp(key.c_str(), "time") == 0) {
00942 time = atoi(token);
00943 }
00944 token = Com_Parse(text);
00945
00946 } while (1);
00947
00948 if ( !strcmp (token, "}") ) {
00949 break;
00950 }
00951
00952 } while (1);
00953
00954 Com_UngetToken();
00955 Com_MatchToken( text, "}" );
00956 }
|
Here is the call graph for this function:

|
|
Definition at line 709 of file splines.h. 00709 {
00710 fov = f;
00711 }
|
|
|
Definition at line 702 of file splines.h. 00702 {
00703 fov = f;
00704 }
|
|
|
Definition at line 724 of file splines.h. References startTime. 00724 {
00725 startTime = t;
00726 }
|
|
|
Definition at line 717 of file splines.h. References startTime. 00717 {
00718 startTime = t;
00719 }
|
|
||||||||||||
|
|
|
||||||||||||
|
Definition at line 1130 of file splines.cpp. References idStr::c_str(), endFOV, fov, FS_Write(), idStr::length(), p, s, startFOV, time, and va(). Referenced by idCameraDef::save(). 01130 {
01131 idStr s = va("\t%s {\n", p);
01132 FS_Write(s.c_str(), s.length(), file);
01133
01134 s = va("\t\tfov %f\n", fov);
01135 FS_Write(s.c_str(), s.length(), file);
01136
01137 s = va("\t\tstartFOV %f\n", startFOV);
01138 FS_Write(s.c_str(), s.length(), file);
01139
01140 s = va("\t\tendFOV %f\n", endFOV);
01141 FS_Write(s.c_str(), s.length(), file);
01142
01143 s = va("\t\ttime %i\n", time);
01144 FS_Write(s.c_str(), s.length(), file);
01145
01146 s = "\t}\n";
01147 FS_Write(s.c_str(), s.length(), file);
01148 }
|
Here is the call graph for this function:

|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1