Changeset 2200
- Timestamp:
- Oct 26, 2004, 12:32:09 PM (22 years ago)
- Location:
- trunk/psLib/src
- Files:
-
- 4 edited
-
astro/psCoord.c (modified) (3 diffs)
-
astro/psCoord.h (modified) (3 diffs)
-
astronomy/psCoord.c (modified) (3 diffs)
-
astronomy/psCoord.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/astro/psCoord.c
r2199 r2200 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-26 2 1:57:42$12 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-26 22:32:09 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 61 61 /* FUNCTION IMPLEMENTATION - PUBLIC */ 62 62 /*****************************************************************************/ 63 static void planeTransformFree(psPlaneTransform *pt) 64 { 65 psFree(pt->x); 66 psFree(pt->y); 67 } 68 69 psPlaneTransform* psPlaneTransformAlloc(int n1, int n2) 70 { 71 psPlaneTransform *pt = psAlloc(sizeof(psPlaneTransform)); 72 pt->x = psDPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD); 73 pt->y = psDPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD); 74 75 p_psMemSetDeallocator(pt, (psFreeFcn) planeTransformFree); 76 return(pt); 77 } 78 63 79 psPlane* psPlaneTransformApply(psPlane* out, 64 80 const psPlaneTransform* transform, … … 73 89 out->y = psDPolynomial2DEval(coords->x, coords->y, transform->y); 74 90 return (out); 91 } 92 93 static void planeDistortFree(psPlaneDistort *pt) 94 { 95 psFree(pt->x); 96 psFree(pt->y); 97 } 98 99 psPlaneDistort* psPlaneDistortAlloc(int n1, int n2, int n3, int n4) 100 { 101 psPlaneDistort *pt = psAlloc(sizeof(psPlaneDistort)); 102 pt->x = psDPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD); 103 pt->y = psDPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD); 104 105 p_psMemSetDeallocator(pt, (psFreeFcn) planeDistortFree); 106 return(pt); 75 107 } 76 108 -
trunk/psLib/src/astro/psCoord.h
r2199 r2200 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-26 2 1:57:42$12 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-26 22:32:09 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 167 167 } psSphereOffsetUnit; 168 168 169 /** Allocates a psPlaneTransform transform. 170 * 171 * @return psPlaneTransform* resulting plane transform 172 */ 173 174 psPlaneTransform* psPlaneTransformAlloc( 175 int n1, ///< The order of the x term in the transform. 176 int n2 ///< The order of the y term in the transform. 177 ); 178 169 179 /** Applies the psPlaneTransform transform to a specified coordinate 170 180 * … … 176 186 const psPlane* coords ///< the coordinate to apply the transform above. 177 187 ); 188 189 /** Allocates a psPlaneDistort transform. 190 * 191 * @return psPlaneDistort* resulting plane distort transform 192 */ 193 194 psPlaneDistort* psPlaneDistortAlloc( 195 int n1, ///< The order of the w term in the transform. 196 int n2, ///< The order of the x term in the transform. 197 int n3, ///< The order of the y term in the transform. 198 int n4 ///< The order of the z term in the transform. 199 ); 200 178 201 179 202 /** Applies the psPlaneDistort transform to a specified coordinate -
trunk/psLib/src/astronomy/psCoord.c
r2199 r2200 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.2 7$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-26 2 1:57:42$12 * @version $Revision: 1.28 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-26 22:32:09 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 61 61 /* FUNCTION IMPLEMENTATION - PUBLIC */ 62 62 /*****************************************************************************/ 63 static void planeTransformFree(psPlaneTransform *pt) 64 { 65 psFree(pt->x); 66 psFree(pt->y); 67 } 68 69 psPlaneTransform* psPlaneTransformAlloc(int n1, int n2) 70 { 71 psPlaneTransform *pt = psAlloc(sizeof(psPlaneTransform)); 72 pt->x = psDPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD); 73 pt->y = psDPolynomial2DAlloc(n1, n2, PS_POLYNOMIAL_ORD); 74 75 p_psMemSetDeallocator(pt, (psFreeFcn) planeTransformFree); 76 return(pt); 77 } 78 63 79 psPlane* psPlaneTransformApply(psPlane* out, 64 80 const psPlaneTransform* transform, … … 73 89 out->y = psDPolynomial2DEval(coords->x, coords->y, transform->y); 74 90 return (out); 91 } 92 93 static void planeDistortFree(psPlaneDistort *pt) 94 { 95 psFree(pt->x); 96 psFree(pt->y); 97 } 98 99 psPlaneDistort* psPlaneDistortAlloc(int n1, int n2, int n3, int n4) 100 { 101 psPlaneDistort *pt = psAlloc(sizeof(psPlaneDistort)); 102 pt->x = psDPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD); 103 pt->y = psDPolynomial4DAlloc(n1, n2, n3, n4, PS_POLYNOMIAL_ORD); 104 105 p_psMemSetDeallocator(pt, (psFreeFcn) planeDistortFree); 106 return(pt); 75 107 } 76 108 -
trunk/psLib/src/astronomy/psCoord.h
r2199 r2200 10 10 * @author George Gusciora, MHPCC 11 11 * 12 * @version $Revision: 1.1 6$ $Name: not supported by cvs2svn $13 * @date $Date: 2004-10-26 2 1:57:42$12 * @version $Revision: 1.17 $ $Name: not supported by cvs2svn $ 13 * @date $Date: 2004-10-26 22:32:09 $ 14 14 * 15 15 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 167 167 } psSphereOffsetUnit; 168 168 169 /** Allocates a psPlaneTransform transform. 170 * 171 * @return psPlaneTransform* resulting plane transform 172 */ 173 174 psPlaneTransform* psPlaneTransformAlloc( 175 int n1, ///< The order of the x term in the transform. 176 int n2 ///< The order of the y term in the transform. 177 ); 178 169 179 /** Applies the psPlaneTransform transform to a specified coordinate 170 180 * … … 176 186 const psPlane* coords ///< the coordinate to apply the transform above. 177 187 ); 188 189 /** Allocates a psPlaneDistort transform. 190 * 191 * @return psPlaneDistort* resulting plane distort transform 192 */ 193 194 psPlaneDistort* psPlaneDistortAlloc( 195 int n1, ///< The order of the w term in the transform. 196 int n2, ///< The order of the x term in the transform. 197 int n3, ///< The order of the y term in the transform. 198 int n4 ///< The order of the z term in the transform. 199 ); 200 178 201 179 202 /** Applies the psPlaneDistort transform to a specified coordinate
Note:
See TracChangeset
for help on using the changeset viewer.
