Panda3D
eggJointPointer.cxx
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 eggJointPointer.cxx
10  * @author drose
11  * @date 2001-02-26
12  */
13 
14 #include "eggJointPointer.h"
15 
16 
17 TypeHandle EggJointPointer::_type_handle;
18 
19 
20 /**
21  * Appends a new frame onto the end of the data, if possible; returns true if
22  * not possible, or false otherwise (e.g. for a static joint).
23  */
25 add_frame(const LMatrix4d &) {
26  return false;
27 }
28 
29 /**
30  * Moves the vertices assigned to this joint into the other joint (which
31  * should be of the same type).
32  */
35 }
36 
37 /**
38  * Rebuilds the entire table all at once, based on the frames added by
39  * repeated calls to add_rebuild_frame() since the last call to
40  * begin_rebuild().
41  *
42  * Until do_rebuild() is called, the animation table is not changed.
43  *
44  * The return value is true if all frames are acceptable, or false if there is
45  * some problem.
46  */
49  return true;
50 }
51 
52 /**
53  * Resets the table before writing to disk so that redundant rows (e.g. i { 1
54  * 1 1 1 1 1 1 1 }) are collapsed out.
55  */
58 }
59 
60 /**
61  * Flags the joint with the indicated DCS flag so that it will be loaded as a
62  * separate node in the player.
63  */
65 expose(EggGroup::DCSType) {
66 }
67 
68 /**
69  * Zeroes out the named components of the transform in the animation frames.
70  */
72 zero_channels(const std::string &) {
73 }
74 
75 /**
76  * Rounds the named components of the transform to the nearest multiple of
77  * quantum.
78  */
80 quantize_channels(const std::string &, double) {
81 }
82 
83 /**
84  * Applies the pose from the indicated frame of the indicated source joint as
85  * the initial pose for this joint.
86  */
88 apply_default_pose(EggJointPointer *source_joint, int frame) {
89 }
virtual void optimize()
Resets the table before writing to disk so that redundant rows (e.g.
virtual bool add_frame(const LMatrix4d &mat)
Appends a new frame onto the end of the data, if possible; returns true if not possible,...
virtual void move_vertices_to(EggJointPointer *new_joint)
Moves the vertices assigned to this joint into the other joint (which should be of the same type).
This class is used during joint optimization or restructuring to store the table of interim joint com...
virtual void quantize_channels(const std::string &components, double quantum)
Rounds the named components of the transform to the nearest multiple of quantum.
virtual void apply_default_pose(EggJointPointer *source_joint, int frame)
Applies the pose from the indicated frame of the indicated source joint as the initial pose for this ...
This is a base class for EggJointNodePointer and EggMatrixTablePointer.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
virtual bool do_rebuild(EggCharacterDb &db)
Rebuilds the entire table all at once, based on the frames added by repeated calls to add_rebuild_fra...
virtual void zero_channels(const std::string &components)
Zeroes out the named components of the transform in the animation frames.
virtual void expose(EggGroup::DCSType dcs_type)
Flags the joint with the indicated DCS flag so that it will be loaded as a separate node in the playe...
TypeHandle is the identifier used to differentiate C++ class types.
Definition: typeHandle.h:81