summaryrefslogtreecommitdiff
path: root/esolid/wrapper/include/genbox.h
blob: 441b2dfb3ed7836fc1d993e2eefd71019543f9c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//  file:    genbox.h
//  update:  12/13/02

#ifndef _GENBOX_H
#define _GENBOX_H

#include <cassert>
#include <cstdlib>
#include <iostream>

#include "bigrational_vector.h"

#include "ksolid.h"

using namespace std;

int get_patch4(const bigrational_vector pts[4], K_PATCH*& patch);
K_SOLID gen_box(const bigrational_vector pts[], const unsigned long num_pts);

//  int get_impl_plane_bilin(const bigrational_vector pts[4], K_RATPOLY*& impl)
//    computes the implicit formula for the plane of the bilinear surface
//      that passes 4 points pts.
//    returns 1 if 4 points pts are coplanar and
//            0 otherwise, i.e., 4 points pts are on some bilinear surface.

int get_impl_plane_bilin(const bigrational_vector [4], K_RATPOLY*&);

//  int get_param_plane(const bigrational_vector& x,
//                      const bigrational_vector& y,
//                      const bigrational_vector& z,
//                      K_RATPOLY*& X,
//                      K_RATPOLY*& Y,
//                      K_RATPOLY*& Z,
//                      K_RATPOLY*& W)
//    computes the parametric formula (X/W, Y/W, Z/W) for the plane
//      that passes 3 points x, y and z.

int get_param_plane(const bigrational_vector&,
                    const bigrational_vector&,
                    const bigrational_vector&,
                    K_RATPOLY*&,
                    K_RATPOLY*&,
                    K_RATPOLY*&,
                    K_RATPOLY*&);

K_SOLID read_box(istream&, const bigrational& = 0);
K_SOLID read_BRLCAD_box(istream&, const bigrational& = 0);

#endif