~ubuntu-branches/ubuntu/karmic/axiom/karmic

« back to all changes in this revision

Viewing changes to src/graph/include/component.h

  • Committer: Bazaar Package Importer
  • Author(s):
  • Date: 2005-02-21 17:08:37 UTC
  • mfrom: (1.2.1 upstream) (2.1.1 hoary)
  • Revision ID: james.westby@ubuntu.com-20050221170837-34vm4j33v4t9hsk4
Tags: 20050201-1
* New upstream release
* Bug fix: "axiom graphics missing?", thanks to Daniel Lakeland (Closes:
  #277692).
* Bug fix: "axiom: Feb 2005 release for sarge would be nice", thanks to
  Balbir Thomas (Closes: #295000).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
Copyright (c) 1991-2002, The Numerical ALgorithms Group Ltd.
 
3
All rights reserved.
 
4
 
 
5
Redistribution and use in source and binary forms, with or without
 
6
modification, are permitted provided that the following conditions are
 
7
met:
 
8
 
 
9
    - Redistributions of source code must retain the above copyright
 
10
      notice, this list of conditions and the following disclaimer.
 
11
 
 
12
    - Redistributions in binary form must reproduce the above copyright
 
13
      notice, this list of conditions and the following disclaimer in
 
14
      the documentation and/or other materials provided with the
 
15
      distribution.
 
16
 
 
17
    - Neither the name of The Numerical ALgorithms Group Ltd. nor the
 
18
      names of its contributors may be used to endorse or promote products
 
19
      derived from this software without specific prior written permission.
 
20
 
 
21
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
 
22
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 
23
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
 
24
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER
 
25
OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 
26
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 
27
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 
28
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 
29
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 
30
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 
31
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
32
*/
 
33
 
 
34
 
 
35
/*
 
36
  Copyright The Numerical Algorithms Group Limited 1991.
 
37
  */
 
38
 
 
39
/* 
 
40
   This file contains the definitions for the generalized point
 
41
   structures in 3D.
 
42
   */
 
43
 
 
44
#include "tube.h"
 
45
 
 
46
/* viewman's and viewAlone's refPt */
 
47
#define refPt(v,x) ((v).points + (x))
 
48
/* view3D's refPt - allows reference into new, dynamically generated points
 
49
   a function called traverse(n) is expected - it returns the nth point in
 
50
   the resevoir. note that x should be zero based (if numOfPoints is 10,
 
51
   then x=10 would access the first point on the resevoir list).
 
52
   */
 
53
#define refPt3D(v,x) ( (x)>(v).numOfPoints?traverse(resMax - ((x)-((v).numOfPoints-1))):(v).points + (x) )
 
54
 
 
55
typedef struct _componentProp {
 
56
  int closed,
 
57
    solid;
 
58
} componentProp;
 
59
 
 
60
typedef struct _LPoint { /* meaning list of points */
 
61
  componentProp prop;
 
62
  int numOfPoints;
 
63
  int *indices;
 
64
} LPoint;
 
65
 
 
66
typedef struct _LLPoint { /* meaning list of list of points */
 
67
  /* for the current 3D stuff:
 
68
     functions of 2 variables - closed is false (xmax does not close
 
69
     back to xmin) parametric surfaces of one variable (tubes) - closed
 
70
     is user defined (from AXIOM)
 
71
     */
 
72
  componentProp prop;
 
73
  int numOfLists;
 
74
  LPoint *lp;
 
75
  int meshColor;   /* not used */
 
76
} LLPoint;
 
77
 
 
78
 
 
79
typedef struct _LLLPoint { /* meaning list of list of list of points */
 
80
  /* for the current 3D stuff -- that is functions of 2 variables and
 
81
     parametric surfaces of one variable (tubes) -- there would be
 
82
     only one component
 
83
     */
 
84
  int numOfComponents;
 
85
  LLPoint *llp;
 
86
} LLLPoint;
 
87
 
 
88