Panda3D
Loading...
Searching...
No Matches
eggMakeTube.h
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file eggMakeTube.h
10 * @author drose
11 * @date 2003-10-01
12 */
13
14#ifndef EGGMAKETUBE_H
15#define EGGMAKETUBE_H
16
17#include "pandatoolbase.h"
18
19#include "eggMakeSomething.h"
20
21class EggGroup;
22class EggVertexPool;
23class EggVertex;
24
25/**
26 * A program to generate an egg file representing a tube model, similar in
27 * shape to a CollisionCapsule.
28 */
30public:
32
33 void run();
34
35private:
36 EggVertex *calc_sphere1_vertex(int ri, int si);
37 EggVertex *calc_sphere2_vertex(int ri, int si);
38 EggVertex *calc_tube_vertex(int ri, int si);
39 void add_polygon(EggVertex *a, EggVertex *b, EggVertex *c, EggVertex *d);
40
41private:
42 double _point_a[3];
43 double _point_b[3];
44 bool _got_point_b;
45 double _radius;
46 int _num_slices;
47 int _num_crings;
48 int _num_trings;
49
50 double _length;
51 EggGroup *_group;
52 EggVertexPool *_vpool;
53};
54
55#endif
The main glue of the egg hierarchy, this corresponds to the <Group>, <Instance>, and <Joint> type nod...
Definition eggGroup.h:34
A base class for a family of programs that generate egg models of various fundamental shapes.
A program to generate an egg file representing a tube model, similar in shape to a CollisionCapsule.
Definition eggMakeTube.h:29
A collection of vertices.
Any one-, two-, three-, or four-component vertex, possibly with attributes such as a normal.
Definition eggVertex.h:39
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.