Panda3D
panda
src
egg
eggMorph.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 eggMorph.h
10
* @author drose
11
* @date 1999-01-29
12
*/
13
14
#ifndef EGGMORPH_H
15
#define EGGMORPH_H
16
17
#include "
pandabase.h
"
18
19
#include "
namable.h
"
20
#include "
luse.h
"
21
#include "
pset.h
"
22
23
/**
24
* A single <Dxyz> or <Duv> or some such entry. This simply contains the
25
* morph name and the offset value. The class EggMorph is actually a template
26
* class on the type of value that is being offset; the specific kinds of
27
* morphs are instantiated from this below.
28
*/
29
template
<
class
Parameter>
30
class
EggMorph
:
public
Namable
{
31
public
:
32
INLINE
EggMorph
(
const
std::string &name,
const
Parameter &offset);
33
INLINE
void
set_offset(
const
Parameter &offset);
34
INLINE
const
Parameter &get_offset()
const
;
35
36
INLINE
bool
operator < (
const
EggMorph<Parameter>
&other)
const
;
37
INLINE
bool
operator == (
const
EggMorph<Parameter>
&other)
const
;
38
INLINE
bool
operator != (
const
EggMorph<Parameter>
&other)
const
;
39
40
INLINE
int
compare_to
(
const
EggMorph<Parameter>
&other,
double
threshold)
const
;
41
42
INLINE
void
output(std::ostream &out,
const
std::string &tag,
43
int
num_dimensions)
const
;
44
45
private
:
46
Parameter _offset;
47
};
48
49
// I'd love to export these, but it produces a strange linker issue with Mac
50
// OS X's version of GCC. We'll do it only on Windows, then.
51
#ifdef _MSC_VER
52
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG,
EggMorph<LVector3d>
);
53
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_EGG, EXPTP_PANDA_EGG,
EggMorph<LVector4>
);
54
#endif
55
56
typedef
EggMorph<LVector3d>
EggMorphVertex
;
57
typedef
EggMorph<LVector3d>
EggMorphNormal
;
58
typedef
EggMorph<LVector3d>
EggMorphTexCoord
;
59
typedef
EggMorph<LVector4>
EggMorphColor
;
60
61
#include "
eggMorph.I
"
62
63
#endif
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
eggMorph.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
namable.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
luse.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
Namable
A base class for all things which can have a name.
Definition:
namable.h:26
EggMorph
A single <Dxyz> or <Duv> or some such entry.
Definition:
eggMorph.h:30
pset.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
EggMorph::compare_to
int compare_to(const EggMorph< Parameter > &other, double threshold) const
compare_to() compares a different space than the operator methods, which only check the name.
Definition:
eggMorph.I:79
Generated on Mon Sep 14 2020 15:06:49 for Panda3D by
1.8.20