28class EXPCL_PANDA_EGG EggXfmSAnim :
public EggGroupNode {
30 INLINE
explicit EggXfmSAnim(
const std::string &name =
"",
31 CoordinateSystem cs = CS_default);
34 INLINE EggXfmSAnim(
const EggXfmSAnim ©);
35 INLINE EggXfmSAnim &operator = (
const EggXfmSAnim ©);
37 INLINE
void set_fps(
double fps);
38 INLINE
void clear_fps();
39 INLINE
bool has_fps()
const;
42 INLINE
void set_order(
const std::string &order);
43 INLINE
void clear_order();
44 INLINE
bool has_order()
const;
45 INLINE
const std::string &get_order()
const;
55 void get_value(
int row, LMatrix4d &mat)
const;
56 bool set_value(
int row,
const LMatrix4d &mat);
64 virtual void write(std::ostream &out,
int indent_level)
const;
67 const LVecBase3d &scale,
68 const LVecBase3d &shear,
69 const LVecBase3d &hpr,
70 const LVecBase3d &trans,
71 const std::string &order,
75 virtual void r_transform(
const LMatrix4d &mat,
const LMatrix4d &inv,
76 CoordinateSystem to_cs);
77 virtual void r_mark_coordsys(CoordinateSystem cs);
80 void normalize_by_rebuilding();
81 void normalize_by_expanding();
88 CoordinateSystem _coordsys;
90 static const std::string _standard_order;
97 static void init_type() {
98 EggGroupNode::init_type();
100 EggGroupNode::get_class_type());
103 return get_class_type();
105 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
virtual void write(std::ostream &out, int indent_level) const
Writes the group and all of its children to the indicated output stream in Egg format.
virtual bool is_anim_matrix() const
Returns true if this node represents a table of animation transformation data, false otherwise.
Corresponding to an <Xfm$Anim> entry, this stores a two-dimensional table with up to nine columns,...
void optimize_to_standard_order()
Optimizes the table by collapsing redundant sub-tables, and simultaneously ensures that the order str...
void optimize()
Optimizes the table by collapsing redundant sub-tables.
CoordinateSystem get_coordinate_system() const
Returns the coordinate system this table believes it is defined within.
void clear_data()
Removes all data from the table.
int get_num_rows() const
Returns the effective number of rows in the table.
static void compose_with_order(LMatrix4d &mat, const LVecBase3d &scale, const LVecBase3d &shear, const LVecBase3d &hpr, const LVecBase3d &trans, const std::string &order, CoordinateSystem cs)
Composes a matrix out of the nine individual components, respecting the order string.
bool add_data(const LMatrix4d &mat)
Adds a new matrix to the table, by adding a new row to each of the subtables.
void get_value(int row, LMatrix4d &mat) const
Returns the value of the aggregate row of the table as a matrix.
bool set_value(int row, const LMatrix4d &mat)
Replaces the indicated row of the table with the given matrix.
void add_component_data(const std::string &component_name, double value)
Adds a new row to the named component (one of matrix_component_letters) of the table.
void normalize()
The inverse operation of optimize(), this ensures that all the sub-tables have the same length by dup...
double get_fps() const
This is only valid if has_fps() returns true.
static const std::string & get_standard_order()
Returns the standard order of matrix component composition.
TypeHandle is the identifier used to differentiate C++ class types.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
void register_type(TypeHandle &type_handle, const std::string &name)
This inline function is just a convenient way to call TypeRegistry::register_type(),...