Panda3D
Loading...
Searching...
No Matches
geomVertexAnimationSpec.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 geomVertexAnimationSpec.h
10 * @author drose
11 * @date 2005-03-29
12 */
13
14#ifndef GEOMVERTEXANIMATIONSPEC_H
15#define GEOMVERTEXANIMATIONSPEC_H
16
17#include "pandabase.h"
18#include "geomEnums.h"
19
20class BamWriter;
21class BamReader;
22class Datagram;
24
25/**
26 * This object describes how the vertex animation, if any, represented in a
27 * GeomVertexData is encoded.
28 *
29 * Vertex animation includes soft-skinned skeleton animation and morphs (blend
30 * shapes), and might be performed on the CPU by Panda, or passed down to the
31 * graphics backed to be performed on the hardware (depending on the
32 * hardware's advertised capabilities).
33 *
34 * Changing this setting doesn't by itself change the way the animation is
35 * actually performed; this just specifies how the vertices are set up to be
36 * animated.
37 */
38class EXPCL_PANDA_GOBJ GeomVertexAnimationSpec : public GeomEnums {
39PUBLISHED:
42 INLINE void operator = (const GeomVertexAnimationSpec &other);
43
44 INLINE AnimationType get_animation_type() const;
45 MAKE_PROPERTY(animation_type, get_animation_type);
46
47 INLINE int get_num_transforms() const;
48 INLINE bool get_indexed_transforms() const;
49 MAKE_PROPERTY(num_transforms, get_num_transforms);
50 MAKE_PROPERTY(indexed_transforms, get_indexed_transforms);
51
52 INLINE void set_none();
53 INLINE void set_panda();
54 INLINE void set_hardware(int num_transforms, bool indexed_transforms);
55
56 void output(std::ostream &out) const;
57
58public:
59 INLINE bool operator < (const GeomVertexAnimationSpec &other) const;
60 INLINE bool operator == (const GeomVertexAnimationSpec &other) const;
61 INLINE bool operator != (const GeomVertexAnimationSpec &other) const;
62 INLINE int compare_to(const GeomVertexAnimationSpec &other) const;
63
64public:
65 void write_datagram(BamWriter *manager, Datagram &dg);
66 void fillin(DatagramIterator &scan, BamReader *manager);
67
68private:
69 AnimationType _animation_type;
70
71 int _num_transforms;
72 bool _indexed_transforms;
73};
74
75INLINE std::ostream &
76operator << (std::ostream &out, const GeomVertexAnimationSpec &animation);
77
79
80#endif
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Definition bamReader.h:110
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
Definition bamWriter.h:63
A class to retrieve the individual data elements previously stored in a Datagram.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
Definition datagram.h:38
This class exists just to provide scoping for the various enumerated types used by Geom,...
Definition geomEnums.h:24
This object describes how the vertex animation, if any, represented in a GeomVertexData is encoded.
An STL function object class, this is intended to be used on any ordered collection of class objects ...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.