open-axiom repository from github
/*1Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.2All rights reserved.34Redistribution and use in source and binary forms, with or without5modification, are permitted provided that the following conditions are6met:78- Redistributions of source code must retain the above copyright9notice, this list of conditions and the following disclaimer.1011- Redistributions in binary form must reproduce the above copyright12notice, this list of conditions and the following disclaimer in13the documentation and/or other materials provided with the14distribution.1516- Neither the name of The Numerical ALgorithms Group Ltd. nor the17names of its contributors may be used to endorse or promote products18derived from this software without specific prior written permission.1920THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS21IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED22TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A23PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER24OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,25EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,26PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR27PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF28LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING29NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS30SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.31*/323334/*35Copyright The Numerical Algorithms Group Limited 1991.36*/3738/*39This file contains the definitions for the generalized point40structures in 3D.41*/4243#include "tube.h"4445/* viewman's and viewAlone's refPt */46#define refPt(v,x) ((v).points + (x))47/* view3D's refPt - allows reference into new, dynamically generated points48a function called traverse(n) is expected - it returns the nth point in49the resevoir. note that x should be zero based (if numOfPoints is 10,50then x=10 would access the first point on the resevoir list).51*/52#define refPt3D(v,x) ( (x)>(v).numOfPoints?traverse(resMax - ((x)-((v).numOfPoints-1))):(v).points + (x) )5354typedef struct _componentProp {55int closed,56solid;57} componentProp;5859typedef struct _LPoint { /* meaning list of points */60componentProp prop;61int numOfPoints;62int *indices;63} LPoint;6465typedef struct _LLPoint { /* meaning list of list of points */66/* for the current 3D stuff:67functions of 2 variables - closed is false (xmax does not close68back to xmin) parametric surfaces of one variable (tubes) - closed69is user defined (from AXIOM)70*/71componentProp prop;72int numOfLists;73LPoint *lp;74int meshColor; /* not used */75} LLPoint;767778typedef struct _LLLPoint { /* meaning list of list of list of points */79/* for the current 3D stuff -- that is functions of 2 variables and80parametric surfaces of one variable (tubes) -- there would be81only one component82*/83int numOfComponents;84LLPoint *llp;85} LLLPoint;8687888990