mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
write doubles to bams for double types
This commit is contained in:
parent
474209d9d1
commit
f6689fe2bd
@ -577,8 +577,13 @@ generate_hash(ChecksumHashGenerator &hashgen, FLOATTYPE threshold) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE_LINMATH void FLOATNAME(LVecBase2)::
|
||||
write_datagram(Datagram &destination) const {
|
||||
#if FLOATTOKEN == 'f'
|
||||
destination.add_float32(_v.v._0);
|
||||
destination.add_float32(_v.v._1);
|
||||
#else
|
||||
destination.add_float64(_v.v._0);
|
||||
destination.add_float64(_v.v._1);
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -588,7 +593,12 @@ write_datagram(Datagram &destination) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE_LINMATH void FLOATNAME(LVecBase2)::
|
||||
read_datagram(DatagramIterator &source) {
|
||||
#if FLOATTOKEN == 'f'
|
||||
_v.v._0 = source.get_float32();
|
||||
_v.v._1 = source.get_float32();
|
||||
#else
|
||||
_v.v._0 = source.get_float64();
|
||||
_v.v._1 = source.get_float64();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -659,9 +659,15 @@ generate_hash(ChecksumHashGenerator &hashgen, FLOATTYPE threshold) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE_LINMATH void FLOATNAME(LVecBase3)::
|
||||
write_datagram(Datagram &destination) const {
|
||||
#if FLOATTOKEN == 'f'
|
||||
destination.add_float32(_v.v._0);
|
||||
destination.add_float32(_v.v._1);
|
||||
destination.add_float32(_v.v._2);
|
||||
#else
|
||||
destination.add_float64(_v.v._0);
|
||||
destination.add_float64(_v.v._1);
|
||||
destination.add_float64(_v.v._2);
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -671,7 +677,13 @@ write_datagram(Datagram &destination) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE_LINMATH void FLOATNAME(LVecBase3)::
|
||||
read_datagram(DatagramIterator &source) {
|
||||
#if FLOATTOKEN == 'f'
|
||||
_v.v._0 = source.get_float32();
|
||||
_v.v._1 = source.get_float32();
|
||||
_v.v._2 = source.get_float32();
|
||||
#else
|
||||
_v.v._0 = source.get_float64();
|
||||
_v.v._1 = source.get_float64();
|
||||
_v.v._2 = source.get_float64();
|
||||
#endif
|
||||
}
|
||||
|
@ -699,10 +699,17 @@ generate_hash(ChecksumHashGenerator &hashgen, FLOATTYPE threshold) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE_LINMATH void FLOATNAME(LVecBase4)::
|
||||
write_datagram(Datagram &destination) const {
|
||||
#if FLOATTOKEN == 'f'
|
||||
destination.add_float32(_v.v._0);
|
||||
destination.add_float32(_v.v._1);
|
||||
destination.add_float32(_v.v._2);
|
||||
destination.add_float32(_v.v._3);
|
||||
#else
|
||||
destination.add_float64(_v.v._0);
|
||||
destination.add_float64(_v.v._1);
|
||||
destination.add_float64(_v.v._2);
|
||||
destination.add_float64(_v.v._3);
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -712,8 +719,15 @@ write_datagram(Datagram &destination) const {
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE_LINMATH void FLOATNAME(LVecBase4)::
|
||||
read_datagram(DatagramIterator &source) {
|
||||
#if FLOATTOKEN == 'f'
|
||||
_v.v._0 = source.get_float32();
|
||||
_v.v._1 = source.get_float32();
|
||||
_v.v._2 = source.get_float32();
|
||||
_v.v._3 = source.get_float32();
|
||||
#else
|
||||
_v.v._0 = source.get_float64();
|
||||
_v.v._1 = source.get_float64();
|
||||
_v.v._2 = source.get_float64();
|
||||
_v.v._3 = source.get_float64();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user