Panda3D
Loading...
Searching...
No Matches
eggTopstrip.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 eggTopstrip.h
10 * @author drose
11 * @date 2001-02-23
12 */
13
14#ifndef EGGTOPSTRIP_H
15#define EGGTOPSTRIP_H
16
17#include "pandatoolbase.h"
18
19#include "eggCharacterFilter.h"
20#include "luse.h"
21
22#include "pvector.h"
23
25class EggCharacterDb;
26class EggJointData;
27class EggJointPointer;
28
29/**
30 * Reads a character model and/or animations and strips out the animation from
31 * one of the top joints from the entire character. Particularly useful for
32 * generating stackable character models from separately-extracted characters.
33 */
35public:
37
38 void run();
40
41 void strip_anim(EggCharacterData *char_data, EggJointData *joint_data,
42 int from_model, EggCharacterData *from_char,
43 EggJointData *top_joint, EggCharacterDb &db);
44 void strip_anim_vertices(EggNode *egg_node, int into_model,
45 int from_model, EggJointData *top_joint,
46 EggCharacterDb &db);
47
48 void adjust_transform(LMatrix4d &mat) const;
49
50
51 std::string _top_joint_name;
52 bool _got_invert_transform;
53 bool _invert_transform;
54 std::string _transform_channels;
55 Filename _channel_filename;
56};
57
58#endif
Represents a single character, as read and collected from several models and animation files.
This class is used during joint optimization or restructuring to store the table of interim joint com...
This is the base class for a family of programs that operate on a number of character models and thei...
This is one node of a hierarchy of EggJointData nodes, each of which represents a single joint of the...
This is a base class for EggJointNodePointer and EggMatrixTablePointer.
A base class for things that may be directly added into the egg hierarchy.
Definition eggNode.h:36
Reads a character model and/or animations and strips out the animation from one of the top joints fro...
Definition eggTopstrip.h:34
void check_transform_channels()
Checks the _transform_channels string to ensure that it contains only the expected nine letters,...
void adjust_transform(LMatrix4d &mat) const
Adjust the transform extracted from the "top" joint according to the -s and -i/-n options,...
void strip_anim(EggCharacterData *char_data, EggJointData *joint_data, int from_model, EggCharacterData *from_char, EggJointData *top_joint, EggCharacterDb &db)
Applies the channels from joint _top_joint in model from_model to the joint referenced by joint_data.
void strip_anim_vertices(EggNode *egg_node, int into_model, int from_model, EggJointData *top_joint, EggCharacterDb &db)
Applies the channels from joint _top_joint in model from_model to the vertices at egg_node.
The name of a file, such as a texture file or an Egg file.
Definition filename.h:44
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.