14#ifndef FFTCOMPRESSOR_H
15#define FFTCOMPRESSOR_H
74 RW_length_mask = 0x3f,
83 int write_run(
Datagram &datagram, RunWidth run_width,
84 const vector_double &run);
86 double get_scale_factor(
int i,
int length)
const;
87 static double interpolate(
double t,
double a,
double b);
89 PN_stdfloat get_compressability(
const PN_stdfloat *data,
int length)
const;
91 int _bam_minor_version;
93 bool _use_error_threshold;
97 bool _transpose_quats;
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 ...
static void free_storage()
Frees memory that has been allocated during past runs of the FFTCompressor.
bool read_reals(DatagramIterator &di, vector_stdfloat &array)
Reads an array of floating-point numbers.
void set_use_error_threshold(bool use_error_threshold)
Enables or disables the use of the error threshold measurement to put a cap on the amount of damage d...
void set_transpose_quats(bool flag)
Sets the transpose_quats flag.
FFTCompressor()
Constructs a new compressor object with default parameters.
bool read_hprs(DatagramIterator &di, pvector< LVecBase3 > &array, bool new_hpr)
Reads an array of HPR angles.
bool get_use_error_threshold() const
Returns whether the error threshold measurement is enabled.
void set_quality(int quality)
Sets the quality factor for the compression.
bool read_header(DatagramIterator &di, int bam_minor_version)
Reads the compression header that was written previously.
int get_quality() const
Returns the quality number that was previously set via set_quality().
static bool is_compression_available()
Returns true if the FFTW library is compiled in, so that this class is actually capable of doing usef...
void write_header(Datagram &datagram)
Writes the compression parameters to the indicated datagram.
void write_reals(Datagram &datagram, const PN_stdfloat *array, int length)
Writes an array of floating-point numbers to the indicated datagram.
void write_hprs(Datagram &datagram, const LVecBase3 *array, int length)
Writes an array of HPR angles to the indicated datagram.
bool get_transpose_quats() const
Returns the transpose_quats flag.
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.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.