Star.hpp   Star.hpp 
skipping to change at line 95 skipping to change at line 95
// //
// qint32 x0 32 // qint32 x0 32
// qint32 x1 32 // qint32 x1 32
// //
// unsigned char bV 8 // unsigned char bV 8
// unsigned char mag 8 // unsigned char mag 8
// Uint16 spInt 16 // Uint16 spInt 16
// //
// qint32 dx0,dx1,plx 32 // qint32 dx0,dx1,plx 32
private: private:
quint8 d[28]; // Use an union so we can access the data as different types without
// aliasing issues.
union {
quint8 uint8[28];
quint16 uint16[14];
qint32 int32[7];
} d;
public: public:
enum {MaxPosVal=0x7FFFFFFF}; enum {MaxPosVal=0x7FFFFFFF};
StelObjectP createStelObject(const SpecialZoneArray<Star1> *a, const SpecialZoneData<Star1> *z) const; StelObjectP createStelObject(const SpecialZoneArray<Star1> *a, const SpecialZoneData<Star1> *z) const;
void getJ2000Pos(const ZoneData *z,float movementFactor, Vec3f& pos) const void getJ2000Pos(const ZoneData *z,float movementFactor, Vec3f& pos) const
{ {
pos = z->axis0; pos = z->axis0;
pos*=((float)(getX0())+movementFactor*getDx0()); pos*=((float)(getX0())+movementFactor*getDx0());
pos+=((float)(getX1())+movementFactor*getDx1())*z->axis1; pos+=((float)(getX1())+movementFactor*getDx1())*z->axis1;
pos+=z->center; pos+=z->center;
} }
inline int getBVIndex() const {return d[12];} inline int getBVIndex() const {return d.uint8[12];}
inline int getMag() const {return d[13];} inline int getMag() const {return d.uint8[13];}
inline int getSpInt() const {return ((Uint16*)d)[7];} inline int getSpInt() const {return d.uint16[7];}
inline int getX0() const { return qFromLittleEndian(((qint32*)d)[1]) inline int getX0() const { return qFromLittleEndian(d.int32[1]);}
; } inline int getX1() const { return qFromLittleEndian(d.int32[2]);}
inline int getX1() const { return qFromLittleEndian(((qint32*)d)[2]) inline int getDx0() const {return qFromLittleEndian(d.int32[4]);}
; } inline int getDx1() const {return qFromLittleEndian(d.int32[5]);}
inline int getDx0() const {return qFromLittleEndian(((qint32*)d)[4]) inline int getPlx() const {return qFromLittleEndian(d.int32[6]);}
;}
inline int getDx1() const {return qFromLittleEndian(((qint32*)d)[5])
;}
inline int getPlx() const {return qFromLittleEndian(((qint32*)d)[6])
;}
inline int getHip() const inline int getHip() const
{ {
quint32 v = d[0] | d[1] << 8 | d[2] << 16; quint32 v = d.uint8[0] | d.uint8[1] << 8 | d.uint8[2] << 16;
return ((qint32)v) << 8 >> 8; return ((qint32)v) << 8 >> 8;
} }
inline int getComponentIds() const inline int getComponentIds() const
{ {
return (qint32)d[3]; return d.uint8[3];
} }
float getBV(void) const {return IndexToBV(getBVIndex());} float getBV(void) const {return IndexToBV(getBVIndex());}
bool hasName() const {return getHip();} bool hasName() const {return getHip();}
QString getNameI18n(void) const; QString getNameI18n(void) const;
int hasComponentID(void) const; int hasComponentID(void) const;
void print(void); void print(void);
}; };
struct Star2 { // 10 byte struct Star2 { // 10 byte
 End of changes. 4 change blocks. 
16 lines changed or deleted 17 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/