Panda3D
eggJointPointer.cxx
1 // Filename: eggJointPointer.cxx
2 // Created by: drose (26Feb01)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "eggJointPointer.h"
16 
17 
18 TypeHandle EggJointPointer::_type_handle;
19 
20 
21 ////////////////////////////////////////////////////////////////////
22 // Function: EggJointPointer::add_frame
23 // Access: Public, Virtual
24 // Description: Appends a new frame onto the end of the data, if
25 // possible; returns true if not possible, or false
26 // otherwise (e.g. for a static joint).
27 ////////////////////////////////////////////////////////////////////
29 add_frame(const LMatrix4d &) {
30  return false;
31 }
32 
33 ////////////////////////////////////////////////////////////////////
34 // Function: EggJointPointer::move_vertices_to
35 // Access: Public, Virtual
36 // Description: Moves the vertices assigned to this joint into the
37 // other joint (which should be of the same type).
38 ////////////////////////////////////////////////////////////////////
41 }
42 
43 ////////////////////////////////////////////////////////////////////
44 // Function: EggJointPointer::do_rebuild
45 // Access: Public, Virtual
46 // Description: Rebuilds the entire table all at once, based on the
47 // frames added by repeated calls to add_rebuild_frame()
48 // since the last call to begin_rebuild().
49 //
50 // Until do_rebuild() is called, the animation table is
51 // not changed.
52 //
53 // The return value is true if all frames are
54 // acceptable, or false if there is some problem.
55 ////////////////////////////////////////////////////////////////////
58  return true;
59 }
60 
61 ////////////////////////////////////////////////////////////////////
62 // Function: EggJointPointer::optimize
63 // Access: Public, Virtual
64 // Description: Resets the table before writing to disk so that
65 // redundant rows (e.g. i { 1 1 1 1 1 1 1 1 }) are
66 // collapsed out.
67 ////////////////////////////////////////////////////////////////////
70 }
71 
72 ////////////////////////////////////////////////////////////////////
73 // Function: EggJointPointer::expose
74 // Access: Public, Virtual
75 // Description: Flags the joint with the indicated DCS flag so that
76 // it will be loaded as a separate node in the player.
77 ////////////////////////////////////////////////////////////////////
79 expose(EggGroup::DCSType) {
80 }
81 
82 ////////////////////////////////////////////////////////////////////
83 // Function: EggJointPointer::zero_channels
84 // Access: Public, Virtual
85 // Description: Zeroes out the named components of the transform in
86 // the animation frames.
87 ////////////////////////////////////////////////////////////////////
89 zero_channels(const string &) {
90 }
91 
92 ////////////////////////////////////////////////////////////////////
93 // Function: EggJointPointer::quantize_channels
94 // Access: Public, Virtual
95 // Description: Rounds the named components of the transform to the
96 // nearest multiple of quantum.
97 ////////////////////////////////////////////////////////////////////
99 quantize_channels(const string &, double) {
100 }
101 
102 ////////////////////////////////////////////////////////////////////
103 // Function: EggJointPointer::apply_default_pose
104 // Access: Public, Virtual
105 // Description: Applies the pose from the indicated frame of the
106 // indicated source joint as the initial pose for
107 // this joint.
108 ////////////////////////////////////////////////////////////////////
110 apply_default_pose(EggJointPointer *source_joint, int frame) {
111 }
virtual void quantize_channels(const string &components, double quantum)
Rounds the named components of the transform to the nearest multiple of quantum.
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, or false otherwise (e.g.
This is a 4-by-4 transform matrix.
Definition: lmatrix.h:4716
virtual void zero_channels(const string &components)
Zeroes out the named components of the transform in the animation frames.
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 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.
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 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:85