1 /**************************************************************************** 2 * sor.h 3 * 4 * This module contains all defines, typedefs, and prototypes for SOR.CPP. 5 * 6 * from Persistence of Vision(tm) Ray Tracer version 3.6. 7 * Copyright 1991-2003 Persistence of Vision Team 8 * Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd. 9 *--------------------------------------------------------------------------- 10 * NOTICE: This source code file is provided so that users may experiment 11 * with enhancements to POV-Ray and to port the software to platforms other 12 * than those supported by the POV-Ray developers. There are strict rules 13 * regarding how you are permitted to use this file. These rules are contained 14 * in the distribution and derivative versions licenses which should have been 15 * provided with this file. 16 * 17 * These licences may be found online, linked from the end-user license 18 * agreement that is located at http://www.povray.org/povlegal.html 19 *--------------------------------------------------------------------------- 20 * This program is based on the popular DKB raytracer version 2.12. 21 * DKBTrace was originally written by David K. Buck. 22 * DKBTrace Ver 2.0-2.12 were written by David K. Buck & Aaron A. Collins. 23 *--------------------------------------------------------------------------- 24 * $File: //depot/povray/3.6-release/source/sor.h $ 25 * $Revision: #2 $ 26 * $Change: 2939 $ 27 * $DateTime: 2004/07/04 13:43:26 $ 28 * $Author: root $ 29 * $Log$ 30 *****************************************************************************/ 31 32 33 34 #ifndef SOR_H 35 #define SOR_H 36 37 #include "bcyl.h" 38 39 BEGIN_POV_NAMESPACE 40 41 /***************************************************************************** 42 * Global preprocessor definitions 43 ******************************************************************************/ 44 45 #define SOR_OBJECT (STURM_OK_OBJECT) 46 47 /* Generate additional surface of revolution statistics. */ 48 49 #define SOR_EXTRA_STATS 1 50 51 52 53 54 /***************************************************************************** 55 * Global typedefs 56 ******************************************************************************/ 57 58 typedef struct Sor_Struct SOR; 59 typedef struct Sor_Spline_Entry_Struct SOR_SPLINE_ENTRY; 60 typedef struct Sor_Spline_Struct SOR_SPLINE; 61 62 struct Sor_Spline_Entry_Struct 63 { 64 DBL A, B, C, D; 65 }; 66 67 struct Sor_Spline_Struct 68 { 69 int References; 70 SOR_SPLINE_ENTRY *Entry; 71 BCYL *BCyl; /* bounding cylinder. */ 72 }; 73 74 struct Sor_Struct 75 { 76 OBJECT_FIELDS 77 int Number; 78 SOR_SPLINE *Spline; /* List of spline segments */ 79 DBL Height1, Height2; /* Min./Max. height */ 80 DBL Radius1, Radius2; /* Min./Max. radius */ 81 DBL Base_Radius_Squared; /* Radius**2 of the base plane */ 82 DBL Cap_Radius_Squared; /* Radius**2 of the cap plane */ 83 }; 84 85 86 87 /***************************************************************************** 88 * Global variables 89 ******************************************************************************/ 90 91 92 93 94 /***************************************************************************** 95 * Global functions 96 ******************************************************************************/ 97 98 SOR *Create_Sor (void); 99 void Compute_Sor_BBox (SOR *Sor); 100 void Compute_Sor (SOR *Sor, UV_VECT *P); 101 102 END_POV_NAMESPACE 103 104 #endif 105