Panda3D
Loading...
Searching...
No Matches
eggCurve.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 eggCurve.h
10 * @author drose
11 * @date 2000-02-15
12 */
13
14#ifndef EGGCURVE_H
15#define EGGCURVE_H
16
17#include "pandabase.h"
18
19#include "eggPrimitive.h"
20
21/**
22 * A parametric curve of some kind. See EggNurbsCurve.
23 */
24class EXPCL_PANDA_EGG EggCurve : public EggPrimitive {
25PUBLISHED:
26 INLINE explicit EggCurve(const std::string &name = "");
27 INLINE EggCurve(const EggCurve &copy);
28 INLINE EggCurve &operator = (const EggCurve &copy);
29
30 enum CurveType {
31 CT_none,
32 CT_xyz,
33 CT_hpr,
34 CT_t
35 };
36
37 INLINE void set_subdiv(int subdiv);
38 INLINE int get_subdiv() const;
39
40 INLINE void set_curve_type(CurveType type);
41 INLINE CurveType get_curve_type() const;
42
43 static CurveType string_curve_type(const std::string &string);
44
45private:
46 int _subdiv;
47 CurveType _type;
48
49public:
50
51 static TypeHandle get_class_type() {
52 return _type_handle;
53 }
54 static void init_type() {
55 EggPrimitive::init_type();
56 register_type(_type_handle, "EggCurve",
57 EggPrimitive::get_class_type());
58 }
59 virtual TypeHandle get_type() const {
60 return get_class_type();
61 }
62 virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
63
64private:
65 static TypeHandle _type_handle;
66};
67
68std::ostream &operator << (std::ostream &out, EggCurve::CurveType t);
69
70#include "eggCurve.I"
71
72#endif
A parametric curve of some kind.
Definition eggCurve.h:24
A base class for any of a number of kinds of geometry primitives: polygons, point lights,...
TypeHandle is the identifier used to differentiate C++ class types.
Definition typeHandle.h:81
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...