00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041 #include <stdio.h>
00042 #include <string.h>
00043 #include "mensagem.h"
00044 #include "memvirtu.h"
00045 #include "lowparam.h"
00046 #include "lowmacro.h"
00047 #include "lowsolid.h"
00048 #include "mancommd.h"
00049 #include "disdispl.h"
00050
00051 #ifdef __Extended_Version
00052 void MSD_execNameListCameraName(void)
00053 {
00054 char name1[15];
00055
00056 while (1 != sscanf(restbuf, "%s", name1))
00057 {
00058 printf(MEN_PerguntaNome, NAM_ListCamara);
00059 if (!lineins("? "))
00060 {
00061 return;
00062 }
00063 }
00064 MSD_highNameListCameraName(name1);
00065 }
00066
00067 #endif
00068
00069 int MSD_highNameListCameraName(char *name)
00070 {
00071 CTYPE *cptr;
00072
00073 if ((cptr = MSD_lowFindCameraByName(name)) == (CTYPE *)NIL)
00074 {
00075 fprintf(stderr, MEN_CamaraNomeNaoEncontrada,
00076 NAM_ListCamara, name);
00077 return(ERROR);
00078 }
00079 return(MSD_lowNameListCameraName(cptr));
00080 }
00081
00082 int MSD_lowNameListCameraName(CTYPE *cptr)
00083 {
00084 static char *strmode[] = { "Paralela", "Axonom. ", "3 vistas" };
00085 static char *strhid[] =
00086 {
00087 "Todos os edges", "Elim. Local ",
00088 "Elim. Completa", "Elim. e Int. "
00089 };
00090 static char *strdisp[] = { "OFF", "ON " };
00091
00092 printf("Camera Nome=%-18s", cptr->cname);
00093 printf(" Modo=%8s", strmode[cptr->mode - 1]);
00094 printf(" Tipo=%-14s\n", strhid[cptr->hid]);
00095 printf(" Ampliacao=%10.3g ", cptr->scale);
00096 printf(" Linhas Hash =%-3s ", strdisp[cptr->dash]);
00097 printf(" Edges Planos=%-3s\n", strdisp[cptr->smooth]);
00098 printf(" P.V.=(%7.3g,%7.3g,%7.3g)", cptr->eye[0], cptr->eye[1],
00099 cptr->eye[2]);
00100 printf(" C.V.=(%7.3g,%7.3g,%7.3g)\n", cptr->ref[0], cptr->ref[1],
00101 cptr->ref[2]);
00102 return(TRUE);
00103 }
00104
00105 void MSD_lowListAllCamera(void)
00106 {
00107 CTYPE *cptr;
00108
00109 for (AllCamera(cptr))
00110 {
00111 MSD_lowNameListCameraName(cptr);
00112 }
00113 }
00114
00115 void MSD_lowListAllCameraName(void)
00116 {
00117 CTYPE *cptr;
00118
00119 for (AllCamera(cptr))
00120 {
00121 printf("%-20s", cptr->cname);
00122 }
00123 printf("\n");
00124 }