mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 16:58:40 -04:00
*** empty log message ***
This commit is contained in:
parent
f5479d95aa
commit
d69d3fc470
@ -34,7 +34,7 @@ void AnimBundle::
|
|||||||
write_datagram(BamWriter *manager, Datagram &me)
|
write_datagram(BamWriter *manager, Datagram &me)
|
||||||
{
|
{
|
||||||
AnimGroup::write_datagram(manager, me);
|
AnimGroup::write_datagram(manager, me);
|
||||||
me.add_float64(_fps);
|
me.add_float32(_fps);
|
||||||
me.add_uint16(_num_frames);
|
me.add_uint16(_num_frames);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ void AnimBundle::
|
|||||||
fillin(DatagramIterator& scan, BamReader* manager)
|
fillin(DatagramIterator& scan, BamReader* manager)
|
||||||
{
|
{
|
||||||
AnimGroup::fillin(scan, manager);
|
AnimGroup::fillin(scan, manager);
|
||||||
_fps = scan.get_float64();
|
_fps = scan.get_float32();
|
||||||
_num_frames = scan.get_uint16();
|
_num_frames = scan.get_uint16();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,11 +94,11 @@ public:
|
|||||||
static const char *get_part_type_name() { return "MovingPart<float>"; }
|
static const char *get_part_type_name() { return "MovingPart<float>"; }
|
||||||
static void write_datagram(Datagram &dest, ValueType& me)
|
static void write_datagram(Datagram &dest, ValueType& me)
|
||||||
{
|
{
|
||||||
dest.add_float64(me);
|
dest.add_float32(me);
|
||||||
}
|
}
|
||||||
static void read_datagram(DatagramIterator &source, ValueType& me)
|
static void read_datagram(DatagramIterator &source, ValueType& me)
|
||||||
{
|
{
|
||||||
me = source.get_float64();
|
me = source.get_float32();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -226,13 +226,13 @@ write_datagram(BamWriter *manager, Datagram &me)
|
|||||||
{
|
{
|
||||||
AnimChannelMatrix::write_datagram(manager, me);
|
AnimChannelMatrix::write_datagram(manager, me);
|
||||||
|
|
||||||
me.add_uint8(quantize_bam_channels);
|
me.add_bool(quantize_bam_channels);
|
||||||
if (!quantize_bam_channels) {
|
if (!quantize_bam_channels) {
|
||||||
// Write out everything the old way, as floats.
|
// Write out everything the old way, as floats.
|
||||||
for(int i = 0; i < num_tables; i++) {
|
for(int i = 0; i < num_tables; i++) {
|
||||||
me.add_uint16(_tables[i].size());
|
me.add_uint16(_tables[i].size());
|
||||||
for(int j = 0; j < (int)_tables[i].size(); j++) {
|
for(int j = 0; j < (int)_tables[i].size(); j++) {
|
||||||
me.add_float64(_tables[i][j]);
|
me.add_float32(_tables[i][j]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -280,11 +280,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
|
|||||||
{
|
{
|
||||||
AnimChannelMatrix::fillin(scan, manager);
|
AnimChannelMatrix::fillin(scan, manager);
|
||||||
|
|
||||||
bool wrote_quantized = false;
|
bool wrote_quantized = scan.get_bool();
|
||||||
if (manager->get_file_minor_ver() >= 1) {
|
|
||||||
// Version 1 and later: we might have quantized channels.
|
|
||||||
wrote_quantized = (bool)scan.get_uint8();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!wrote_quantized) {
|
if (!wrote_quantized) {
|
||||||
// Regular floats.
|
// Regular floats.
|
||||||
@ -292,7 +288,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
|
|||||||
int size = scan.get_uint16();
|
int size = scan.get_uint16();
|
||||||
PTA_float ind_table;
|
PTA_float ind_table;
|
||||||
for(int j = 0; j < size; j++) {
|
for(int j = 0; j < size; j++) {
|
||||||
ind_table.push_back(scan.get_float64());
|
ind_table.push_back(scan.get_float32());
|
||||||
}
|
}
|
||||||
_tables[i] = ind_table;
|
_tables[i] = ind_table;
|
||||||
}
|
}
|
||||||
|
@ -118,12 +118,12 @@ write_datagram(BamWriter *manager, Datagram &me)
|
|||||||
{
|
{
|
||||||
AnimChannelScalar::write_datagram(manager, me);
|
AnimChannelScalar::write_datagram(manager, me);
|
||||||
|
|
||||||
me.add_uint8(quantize_bam_channels);
|
me.add_bool(quantize_bam_channels);
|
||||||
if (!quantize_bam_channels) {
|
if (!quantize_bam_channels) {
|
||||||
// Write out everything the old way, as floats.
|
// Write out everything the old way, as floats.
|
||||||
me.add_uint16(_table.size());
|
me.add_uint16(_table.size());
|
||||||
for(int i = 0; i < (int)_table.size(); i++) {
|
for(int i = 0; i < (int)_table.size(); i++) {
|
||||||
me.add_float64(_table[i]);
|
me.add_float32(_table[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -150,18 +150,14 @@ fillin(DatagramIterator& scan, BamReader* manager)
|
|||||||
{
|
{
|
||||||
AnimChannelScalar::fillin(scan, manager);
|
AnimChannelScalar::fillin(scan, manager);
|
||||||
|
|
||||||
bool wrote_quantized = false;
|
bool wrote_quantized = scan.get_bool();
|
||||||
if (manager->get_file_minor_ver() >= 1) {
|
|
||||||
// Version 1 and later: we might have quantized channels.
|
|
||||||
wrote_quantized = (bool)scan.get_uint8();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!wrote_quantized) {
|
if (!wrote_quantized) {
|
||||||
// Regular floats.
|
// Regular floats.
|
||||||
int size = scan.get_uint16();
|
int size = scan.get_uint16();
|
||||||
PTA_float temp_table;
|
PTA_float temp_table;
|
||||||
for(int i = 0; i < size; i++) {
|
for(int i = 0; i < size; i++) {
|
||||||
temp_table.push_back(scan.get_float64());
|
temp_table.push_back(scan.get_float32());
|
||||||
}
|
}
|
||||||
_table = temp_table;
|
_table = temp_table;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ write_datagram(Datagram &dest)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
dest.add_int16(_joint_index);
|
dest.add_int16(_joint_index);
|
||||||
dest.add_float64(_effect);
|
dest.add_float32(_effect);
|
||||||
dest.add_uint16(_vindex.size());
|
dest.add_uint16(_vindex.size());
|
||||||
for(i = 0; i < (int)_vindex.size(); i++)
|
for(i = 0; i < (int)_vindex.size(); i++)
|
||||||
{
|
{
|
||||||
@ -100,7 +100,7 @@ read_datagram(DatagramIterator &source)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
_joint_index = source.get_int16();
|
_joint_index = source.get_int16();
|
||||||
_effect = source.get_float64();
|
_effect = source.get_float32();
|
||||||
int vsize = source.get_uint16();
|
int vsize = source.get_uint16();
|
||||||
for(i = 0; i < vsize; i++)
|
for(i = 0; i < vsize; i++)
|
||||||
{
|
{
|
||||||
|
@ -197,7 +197,7 @@ write_datagram(BamWriter *manager, Datagram &me)
|
|||||||
|
|
||||||
me.add_uint32(_from_collide_mask.get_word());
|
me.add_uint32(_from_collide_mask.get_word());
|
||||||
me.add_uint32(_into_collide_mask.get_word());
|
me.add_uint32(_into_collide_mask.get_word());
|
||||||
me.add_uint8(_collide_geom);
|
me.add_bool(_collide_geom);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -224,12 +224,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
|
|||||||
|
|
||||||
_from_collide_mask.set_word(scan.get_uint32());
|
_from_collide_mask.set_word(scan.get_uint32());
|
||||||
_into_collide_mask.set_word(scan.get_uint32());
|
_into_collide_mask.set_word(scan.get_uint32());
|
||||||
|
_collide_geom = scan.get_bool();
|
||||||
if (manager->get_file_minor_ver() >= 2) {
|
|
||||||
_collide_geom = (scan.get_uint8() != 0);
|
|
||||||
} else {
|
|
||||||
_collide_geom = false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -285,7 +285,7 @@ write_datagram(BamWriter *manager, Datagram &me)
|
|||||||
{
|
{
|
||||||
CollisionSolid::write_datagram(manager, me);
|
CollisionSolid::write_datagram(manager, me);
|
||||||
_center.write_datagram(me);
|
_center.write_datagram(me);
|
||||||
me.add_float64(_radius);
|
me.add_float32(_radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -301,7 +301,7 @@ fillin(DatagramIterator& scan, BamReader* manager)
|
|||||||
{
|
{
|
||||||
CollisionSolid::fillin(scan, manager);
|
CollisionSolid::fillin(scan, manager);
|
||||||
_center.read_datagram(scan);
|
_center.read_datagram(scan);
|
||||||
_radius = scan.get_float64();
|
_radius = scan.get_float32();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -413,10 +413,10 @@ write_datagram(BamWriter *manager, Datagram &me) {
|
|||||||
WRITE_PTA(manager, me, IPD_Colorf::write_datagram, _flare_colors[i])
|
WRITE_PTA(manager, me, IPD_Colorf::write_datagram, _flare_colors[i])
|
||||||
}
|
}
|
||||||
|
|
||||||
me.add_float64(_global_scale);
|
me.add_float32(_global_scale);
|
||||||
me.add_float64(_texel_scale);
|
me.add_float32(_texel_scale);
|
||||||
me.add_float64(_blind_fall_off);
|
me.add_float32(_blind_fall_off);
|
||||||
me.add_float64(_flare_fall_off);
|
me.add_float32(_flare_fall_off);
|
||||||
|
|
||||||
manager->write_pointer(me, _light_node);
|
manager->write_pointer(me, _light_node);
|
||||||
}
|
}
|
||||||
@ -481,10 +481,10 @@ fillin(DatagramIterator &scan, BamReader *manager)
|
|||||||
_flare_colors.push_back(temp);
|
_flare_colors.push_back(temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
_global_scale = scan.get_float64();
|
_global_scale = scan.get_float32();
|
||||||
_texel_scale = scan.get_float64();
|
_texel_scale = scan.get_float32();
|
||||||
_blind_fall_off = scan.get_float64();
|
_blind_fall_off = scan.get_float32();
|
||||||
_flare_fall_off = scan.get_float64();
|
_flare_fall_off = scan.get_float32();
|
||||||
|
|
||||||
manager->read_pointer(scan, this);
|
manager->read_pointer(scan, this);
|
||||||
}
|
}
|
||||||
|
@ -121,8 +121,8 @@ operator < (const LODSwitch &) const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void LODSwitch::
|
INLINE void LODSwitch::
|
||||||
write_datagram(Datagram &destination) const {
|
write_datagram(Datagram &destination) const {
|
||||||
destination.add_float64(_in);
|
destination.add_float32(_in);
|
||||||
destination.add_float64(_out);
|
destination.add_float32(_out);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -134,6 +134,6 @@ write_datagram(Datagram &destination) const {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE void LODSwitch::
|
INLINE void LODSwitch::
|
||||||
read_datagram(DatagramIterator &source) {
|
read_datagram(DatagramIterator &source) {
|
||||||
_in = source.get_float64();
|
_in = source.get_float32();
|
||||||
_out = source.get_float64();
|
_out = source.get_float32();
|
||||||
}
|
}
|
||||||
|
@ -77,10 +77,5 @@ write_datagram(BamWriter *, Datagram &me)
|
|||||||
void ImageBuffer::
|
void ImageBuffer::
|
||||||
fillin(DatagramIterator &scan, BamReader *manager) {
|
fillin(DatagramIterator &scan, BamReader *manager) {
|
||||||
set_name(scan.get_string());
|
set_name(scan.get_string());
|
||||||
|
set_alpha_name(scan.get_string());
|
||||||
if (manager->get_file_minor_ver() >= 3) {
|
|
||||||
set_alpha_name(scan.get_string());
|
|
||||||
} else {
|
|
||||||
clear_alpha_name();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -423,11 +423,7 @@ fillin(DatagramIterator &scan, BamReader *manager) {
|
|||||||
_magfiltercolor = (enum FilterType) scan.get_uint8();
|
_magfiltercolor = (enum FilterType) scan.get_uint8();
|
||||||
_magfilteralpha = (enum FilterType) scan.get_uint8();
|
_magfilteralpha = (enum FilterType) scan.get_uint8();
|
||||||
|
|
||||||
if (manager->get_file_minor_ver() >= 4) {
|
_anisotropic_degree = scan.get_int16();
|
||||||
_anisotropic_degree = scan.get_int16();
|
|
||||||
} else {
|
|
||||||
_anisotropic_degree = 1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -451,10 +447,7 @@ make_Texture(const FactoryParams ¶ms)
|
|||||||
DatagramIterator scan(packet);
|
DatagramIterator scan(packet);
|
||||||
|
|
||||||
string name = scan.get_string();
|
string name = scan.get_string();
|
||||||
string alpha_name;
|
string alpha_name = scan.get_string();
|
||||||
if (manager->get_file_minor_ver() >= 3) {
|
|
||||||
alpha_name = scan.get_string();
|
|
||||||
}
|
|
||||||
|
|
||||||
PT(Texture) me;
|
PT(Texture) me;
|
||||||
|
|
||||||
|
@ -1043,7 +1043,7 @@ write_datagram(Datagram &destination) const
|
|||||||
{
|
{
|
||||||
for(int j = 0; j < 3; j++)
|
for(int j = 0; j < 3; j++)
|
||||||
{
|
{
|
||||||
destination.add_float64(get_cell(i,j));
|
destination.add_float32(get_cell(i,j));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1060,7 +1060,7 @@ read_datagram(DatagramIterator &scan)
|
|||||||
{
|
{
|
||||||
for(int j = 0; j < 3; j++)
|
for(int j = 0; j < 3; j++)
|
||||||
{
|
{
|
||||||
set_cell(i, j, scan.get_float64());
|
set_cell(i, j, scan.get_float32());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1449,7 +1449,7 @@ write_datagram(Datagram &destination) const
|
|||||||
{
|
{
|
||||||
for(int j = 0; j < 4; j++)
|
for(int j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
destination.add_float64(get_cell(i,j));
|
destination.add_float32(get_cell(i,j));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1467,7 +1467,7 @@ read_datagram(DatagramIterator &scan)
|
|||||||
{
|
{
|
||||||
for(int j = 0; j < 4; j++)
|
for(int j = 0; j < 4; j++)
|
||||||
{
|
{
|
||||||
set_cell(i, j, scan.get_float64());
|
set_cell(i, j, scan.get_float32());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -575,8 +575,8 @@ init_type() {
|
|||||||
template<class NumType>
|
template<class NumType>
|
||||||
void LVecBase2<NumType>::
|
void LVecBase2<NumType>::
|
||||||
write_datagram(Datagram &destination) const {
|
write_datagram(Datagram &destination) const {
|
||||||
destination.add_float64(_data[0]);
|
destination.add_float32(_data[0]);
|
||||||
destination.add_float64(_data[1]);
|
destination.add_float32(_data[1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -587,8 +587,8 @@ write_datagram(Datagram &destination) const {
|
|||||||
template<class NumType>
|
template<class NumType>
|
||||||
void LVecBase2<NumType>::
|
void LVecBase2<NumType>::
|
||||||
read_datagram(DatagramIterator &source) {
|
read_datagram(DatagramIterator &source) {
|
||||||
_data[0] = source.get_float64();
|
_data[0] = source.get_float32();
|
||||||
_data[1] = source.get_float64();
|
_data[1] = source.get_float32();
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
@ -648,9 +648,9 @@ init_type() {
|
|||||||
template<class NumType>
|
template<class NumType>
|
||||||
void LVecBase3<NumType>::
|
void LVecBase3<NumType>::
|
||||||
write_datagram(Datagram &destination) const {
|
write_datagram(Datagram &destination) const {
|
||||||
destination.add_float64(_data[0]);
|
destination.add_float32(_data[0]);
|
||||||
destination.add_float64(_data[1]);
|
destination.add_float32(_data[1]);
|
||||||
destination.add_float64(_data[2]);
|
destination.add_float32(_data[2]);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -661,9 +661,9 @@ write_datagram(Datagram &destination) const {
|
|||||||
template<class NumType>
|
template<class NumType>
|
||||||
void LVecBase3<NumType>::
|
void LVecBase3<NumType>::
|
||||||
read_datagram(DatagramIterator &source) {
|
read_datagram(DatagramIterator &source) {
|
||||||
_data[0] = source.get_float64();
|
_data[0] = source.get_float32();
|
||||||
_data[1] = source.get_float64();
|
_data[1] = source.get_float32();
|
||||||
_data[2] = source.get_float64();
|
_data[2] = source.get_float32();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -676,10 +676,10 @@ init_type() {
|
|||||||
template<class NumType>
|
template<class NumType>
|
||||||
void LVecBase4<NumType>::
|
void LVecBase4<NumType>::
|
||||||
write_datagram(Datagram &destination) const {
|
write_datagram(Datagram &destination) const {
|
||||||
destination.add_float64(_data[0]);
|
destination.add_float32(_data[0]);
|
||||||
destination.add_float64(_data[1]);
|
destination.add_float32(_data[1]);
|
||||||
destination.add_float64(_data[2]);
|
destination.add_float32(_data[2]);
|
||||||
destination.add_float64(_data[3]);
|
destination.add_float32(_data[3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -690,10 +690,10 @@ write_datagram(Datagram &destination) const {
|
|||||||
template<class NumType>
|
template<class NumType>
|
||||||
void LVecBase4<NumType>::
|
void LVecBase4<NumType>::
|
||||||
read_datagram(DatagramIterator &source) {
|
read_datagram(DatagramIterator &source) {
|
||||||
_data[0] = source.get_float64();
|
_data[0] = source.get_float32();
|
||||||
_data[1] = source.get_float64();
|
_data[1] = source.get_float32();
|
||||||
_data[2] = source.get_float64();
|
_data[2] = source.get_float32();
|
||||||
_data[3] = source.get_float64();
|
_data[3] = source.get_float32();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -283,10 +283,10 @@ template<class NumType>
|
|||||||
void Plane<NumType>::
|
void Plane<NumType>::
|
||||||
write_datagram(Datagram &dest)
|
write_datagram(Datagram &dest)
|
||||||
{
|
{
|
||||||
dest.add_float64(_a);
|
dest.add_float32(_a);
|
||||||
dest.add_float64(_b);
|
dest.add_float32(_b);
|
||||||
dest.add_float64(_c);
|
dest.add_float32(_c);
|
||||||
dest.add_float64(_d);
|
dest.add_float32(_d);
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -298,8 +298,8 @@ template<class NumType>
|
|||||||
void Plane<NumType>::
|
void Plane<NumType>::
|
||||||
read_datagram(DatagramIterator &source)
|
read_datagram(DatagramIterator &source)
|
||||||
{
|
{
|
||||||
_a = source.get_float64();
|
_a = source.get_float32();
|
||||||
_b = source.get_float64();
|
_b = source.get_float32();
|
||||||
_c = source.get_float64();
|
_c = source.get_float32();
|
||||||
_d = source.get_float64();
|
_d = source.get_float32();
|
||||||
}
|
}
|
||||||
|
@ -15,13 +15,11 @@
|
|||||||
//for detecting files damaged due to ASCII/Binary conversion
|
//for detecting files damaged due to ASCII/Binary conversion
|
||||||
static const string _bam_header = string("pbj\0\n\r", 6);
|
static const string _bam_header = string("pbj\0\n\r", 6);
|
||||||
|
|
||||||
static const unsigned short _bam_major_ver = 2;
|
static const unsigned short _bam_major_ver = 3;
|
||||||
// Bumped to major version 2 on 7/6/00 due to major changes in Character.
|
// Bumped to major version 2 on 7/6/00 due to major changes in Character.
|
||||||
static const unsigned short _bam_minor_ver = 4;
|
// Bumped to major version 3 on 12/8/00 to change float64's to float32's.
|
||||||
// Bumped to minor version 1 on 7/19/00 to quantize channel files.
|
|
||||||
// Bumped to minor version 2 on 8/21/00 for CollisionNode::_collide_geom.
|
static const unsigned short _bam_minor_ver = 0;
|
||||||
// Bumped to minor version 3 on 11/21/00 for dual-image textures.
|
|
||||||
// Bumped to minor version 4 on 11/28/00 for anisotropic texture filtering.
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,7 +19,7 @@ write_datagram(Datagram &dest, CPTA_float array)
|
|||||||
{
|
{
|
||||||
dest.add_uint32(array.size());
|
dest.add_uint32(array.size());
|
||||||
for (int i = 0; i < (int)array.size(); i++) {
|
for (int i = 0; i < (int)array.size(); i++) {
|
||||||
dest.add_float64(array[i]);
|
dest.add_float32(array[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ read_datagram(DatagramIterator &source)
|
|||||||
|
|
||||||
int size = source.get_uint32();
|
int size = source.get_uint32();
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
array.push_back(source.get_float64());
|
array.push_back(source.get_float32());
|
||||||
}
|
}
|
||||||
|
|
||||||
return array;
|
return array;
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void TimedCycle::
|
void TimedCycle::
|
||||||
write_datagram(Datagram &me) {
|
write_datagram(Datagram &me) {
|
||||||
me.add_float64(_cycle_time);
|
me.add_float32(_cycle_time);
|
||||||
me.add_uint16(_element_count);
|
me.add_uint16(_element_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ write_datagram(Datagram &me) {
|
|||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void TimedCycle::
|
void TimedCycle::
|
||||||
fillin(DatagramIterator &scan) {
|
fillin(DatagramIterator &scan) {
|
||||||
_cycle_time = scan.get_float64();
|
_cycle_time = scan.get_float32();
|
||||||
_element_count = scan.get_uint16();
|
_element_count = scan.get_uint16();
|
||||||
_inv_cycle_time = 1. / _cycle_time;
|
_inv_cycle_time = 1. / _cycle_time;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user