LLPartSysCompressedPacket Class Reference

#include <partsyspacket.h>

Collaboration diagram for LLPartSysCompressedPacket:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLPartSysCompressedPacket ()
 ~LLPartSysCompressedPacket ()
BOOL fromLLPartInitData (LLPartInitData *in, U32 &bytesUsed)
BOOL toLLPartInitData (LLPartInitData *out, U32 *bytesUsed)
BOOL fromUnsignedBytes (U8 *in, U32 bytesUsed)
BOOL toUnsignedBytes (U8 *out)
U32 bufferSize ()
U8getBytePtr ()

Protected Member Functions

void writeFlagByte (LLPartInitData *in)
U32 writeKill_p (LLPartInitData *in, U32 startByte)
U32 writeBounce_p (LLPartInitData *in, U32 startByte)
U32 writeBounce_b (LLPartInitData *in, U32 startByte)
U32 writeAlphaScaleDiffEqn_range (LLPartInitData *in, U32 startByte)
U32 writeScale_range (LLPartInitData *in, U32 startByte)
U32 writeAlpha_range (LLPartInitData *in, U32 startByte)
U32 writeUUID (LLPartInitData *in, U32 startByte)
U32 writeVelocityOffset (LLPartInitData *in, U32 startByte)
U32 writeSpawn (LLPartInitData *in, U32 startByte)
U32 writeEnvironment (LLPartInitData *in, U32 startByte)
U32 writeLifespan (LLPartInitData *in, U32 startByte)
U32 writeDecayDamp (LLPartInitData *in, U32 startByte)
U32 writeWindDiffusionFactor (LLPartInitData *in, U32 startByte)
U32 readKill_p (LLPartInitData *in, U32 startByte)
U32 readBounce_p (LLPartInitData *in, U32 startByte)
U32 readBounce_b (LLPartInitData *in, U32 startByte)
U32 readAlphaScaleDiffEqn_range (LLPartInitData *in, U32 startByte)
U32 readScale_range (LLPartInitData *in, U32 startByte)
U32 readAlpha_range (LLPartInitData *in, U32 startByte)
U32 readUUID (LLPartInitData *in, U32 startByte)
U32 readVelocityOffset (LLPartInitData *in, U32 startByte)
U32 readSpawn (LLPartInitData *in, U32 startByte)
U32 readEnvironment (LLPartInitData *in, U32 startByte)
U32 readLifespan (LLPartInitData *in, U32 startByte)
U32 readDecayDamp (LLPartInitData *in, U32 startByte)
U32 readWindDiffusionFactor (LLPartInitData *in, U32 startByte)

Protected Attributes

U8 mData [MAX_PART_SYS_PACKET_SIZE]
U32 mNumBytes
LLPartInitData mDefaults
LLPartInitData mWorkingCopy

Detailed Description

Definition at line 205 of file partsyspacket.h.


Constructor & Destructor Documentation

LLPartSysCompressedPacket::LLPartSysCompressedPacket (  ) 

Definition at line 138 of file partsyspacket.cpp.

References gSetInitDataDefaults(), i, MAX_PART_SYS_PACKET_SIZE, mData, and mDefaults.

LLPartSysCompressedPacket::~LLPartSysCompressedPacket (  ) 

Definition at line 149 of file partsyspacket.cpp.


Member Function Documentation

U32 LLPartSysCompressedPacket::bufferSize (  ) 

Definition at line 1284 of file partsyspacket.cpp.

References mNumBytes.

BOOL LLPartSysCompressedPacket::fromLLPartInitData ( LLPartInitData in,
U32 bytesUsed 
)

Definition at line 1058 of file partsyspacket.cpp.

References i, LLPartInitData::initialParticles, LLPartInitData::maxParticles, mData, LLPartInitData::mFlags, mNumBytes, PART_SYS_ALPHA_SCALE_DIFF_MASK, PART_SYS_BOUNCE_B_MASK, PART_SYS_BOUNCE_P_MASK, PART_SYS_BYTE_3_ALPHA_MASK, PART_SYS_BYTE_DECAY_DAMP_MASK, PART_SYS_BYTE_ENVIRONMENT_MASK, PART_SYS_BYTE_LIFESPAN_MASK, PART_SYS_BYTE_SPAWN_MASK, PART_SYS_BYTE_WIND_DIFF_MASK, PART_SYS_KILL_P_MASK, PART_SYS_M_IMAGE_UUID_MASK, PART_SYS_SCALE_RANGE_MASK, PART_SYS_VEL_OFFSET_MASK, TRUE, writeAlpha_range(), writeAlphaScaleDiffEqn_range(), writeBounce_b(), writeBounce_p(), writeDecayDamp(), writeEnvironment(), writeFlagByte(), writeKill_p(), writeLifespan(), writeScale_range(), writeSpawn(), writeUUID(), writeVelocityOffset(), and writeWindDiffusionFactor().

BOOL LLPartSysCompressedPacket::fromUnsignedBytes ( U8 in,
U32  bytesUsed 
)

Definition at line 1268 of file partsyspacket.cpp.

References FALSE, llendl, llerrs, mData, mNumBytes, NULL, and TRUE.

U8 * LLPartSysCompressedPacket::getBytePtr (  ) 

Definition at line 1295 of file partsyspacket.cpp.

References mData.

U32 LLPartSysCompressedPacket::readAlpha_range ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 847 of file partsyspacket.cpp.

References LLPartInitData::alpha_range, floatFromTwoBytes(), i, and mData.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readAlphaScaleDiffEqn_range ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 828 of file partsyspacket.cpp.

References LLPartInitData::diffEqAlpha, LLPartInitData::diffEqScale, floatFromTwoBytes(), i, and mData.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readBounce_b ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 792 of file partsyspacket.cpp.

References LLPartInitData::bounce_b, floatFromTwoBytes(), and mData.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readBounce_p ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 770 of file partsyspacket.cpp.

References LLPartInitData::bouncePlaneNormal, LLPartInitData::bouncePlaneZ, floatFromTwoBytes(), and mData.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readDecayDamp ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 1025 of file partsyspacket.cpp.

References LLPartInitData::alphaDecay, LLPartInitData::dampMotionFactor, floatFromTwoBytes(), mData, LLPartInitData::scaleDecay, and LLPartInitData::speedLimit.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readEnvironment ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 984 of file partsyspacket.cpp.

References LLPartInitData::currentGravity, floatFromTwoBytes(), LLPartInitData::gravityWeight, i, mData, and LLPartInitData::windWeight.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readKill_p ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 746 of file partsyspacket.cpp.

References LLPartInitData::distanceDeath, floatFromTwoBytes(), LLPartInitData::killPlaneNormal, LLPartInitData::killPlaneZ, and mData.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readLifespan ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 1008 of file partsyspacket.cpp.

References floatFromTwoBytes(), LLPartInitData::globalLifetime, LLPartInitData::individualLifetime, LLPartInitData::individualLifetimeRange, and mData.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readScale_range ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 860 of file partsyspacket.cpp.

References floatFromTwoBytes(), i, mData, and LLPartInitData::scale_range.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readSpawn ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 949 of file partsyspacket.cpp.

References floatFromTwoBytes(), i, mData, LLPartInitData::spawnDirection, LLPartInitData::spawnDirectionRange, LLPartInitData::spawnFreqencyRange, LLPartInitData::spawnFrequency, LLPartInitData::spawnRange, LLPartInitData::spawnVelocity, and LLPartInitData::spawnVelocityRange.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readUUID ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 886 of file partsyspacket.cpp.

References IMG_BIG_EXPLOSION_1, IMG_BIG_EXPLOSION_2, IMG_EXPLOSION, IMG_EXPLOSION_2, IMG_EXPLOSION_3, IMG_EXPLOSION_4, IMG_FIRE, IMG_SHOT, IMG_SMOKE_POOF, IMG_SPARK, LLUUID::mData, mData, and LLPartInitData::mImageUuid.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readVelocityOffset ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 873 of file partsyspacket.cpp.

References floatFromTwoBytes(), i, mData, and LLPartInitData::vel_offset.

Referenced by toLLPartInitData().

U32 LLPartSysCompressedPacket::readWindDiffusionFactor ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 1045 of file partsyspacket.cpp.

References floatFromTwoBytes(), i, mData, and LLPartInitData::windDiffusionFactor.

Referenced by toLLPartInitData().

BOOL LLPartSysCompressedPacket::toLLPartInitData ( LLPartInitData out,
U32 bytesUsed 
)

Definition at line 1177 of file partsyspacket.cpp.

References gSetInitDataDefaults(), i, LLPartInitData::initialParticles, LLPartInitData::maxParticles, mData, LLPartInitData::mFlags, PART_SYS_ALPHA_SCALE_DIFF_MASK, PART_SYS_BOUNCE_B_MASK, PART_SYS_BOUNCE_P_MASK, PART_SYS_BYTE_3_ALPHA_MASK, PART_SYS_BYTE_DECAY_DAMP_MASK, PART_SYS_BYTE_ENVIRONMENT_MASK, PART_SYS_BYTE_LIFESPAN_MASK, PART_SYS_BYTE_SPAWN_MASK, PART_SYS_BYTE_WIND_DIFF_MASK, PART_SYS_KILL_P_MASK, PART_SYS_M_IMAGE_UUID_MASK, PART_SYS_SCALE_RANGE_MASK, PART_SYS_VEL_OFFSET_MASK, readAlpha_range(), readAlphaScaleDiffEqn_range(), readBounce_b(), readBounce_p(), readDecayDamp(), readEnvironment(), readKill_p(), readLifespan(), readScale_range(), readSpawn(), readUUID(), readVelocityOffset(), readWindDiffusionFactor(), and TRUE.

BOOL LLPartSysCompressedPacket::toUnsignedBytes ( U8 out  ) 

Definition at line 1289 of file partsyspacket.cpp.

References mData, mNumBytes, and TRUE.

U32 LLPartSysCompressedPacket::writeAlpha_range ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 495 of file partsyspacket.cpp.

References LLPartInitData::alpha_range, i, mData, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeAlphaScaleDiffEqn_range ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 462 of file partsyspacket.cpp.

References LLPartInitData::diffEqAlpha, LLPartInitData::diffEqScale, i, mData, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeBounce_b ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 429 of file partsyspacket.cpp.

References LLPartInitData::bounce_b, mData, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeBounce_p ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 407 of file partsyspacket.cpp.

References LLPartInitData::bouncePlaneNormal, LLPartInitData::bouncePlaneZ, mData, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeDecayDamp ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 663 of file partsyspacket.cpp.

References LLPartInitData::alphaDecay, LLPartInitData::dampMotionFactor, mData, LLPartInitData::scaleDecay, LLPartInitData::speedLimit, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeEnvironment ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 621 of file partsyspacket.cpp.

References LLPartInitData::currentGravity, LLPartInitData::gravityWeight, i, mData, twoBytesFromFloat(), and LLPartInitData::windWeight.

Referenced by fromLLPartInitData().

void LLPartSysCompressedPacket::writeFlagByte ( LLPartInitData in  )  [protected]

Definition at line 154 of file partsyspacket.cpp.

References LLPartInitData::alpha_range, LLPartInitData::bounce_b, LLPartInitData::bouncePlaneNormal, LLPartInitData::bouncePlaneZ, LLPartInitData::diffEqAlpha, LLPartInitData::diffEqScale, LLPartInitData::distanceDeath, i, LLPartInitData::killPlaneNormal, LLPartInitData::killPlaneZ, mData, mDefaults, LLPartInitData::mFlags, LLPartInitData::mImageUuid, PART_SYS_ALPHA_SCALE_DIFF_MASK, PART_SYS_BOUNCE_B_MASK, PART_SYS_BOUNCE_P_MASK, PART_SYS_BYTE_3_ALPHA_MASK, PART_SYS_KILL_P_MASK, PART_SYS_M_IMAGE_UUID_MASK, PART_SYS_SCALE_RANGE_MASK, PART_SYS_VEL_OFFSET_MASK, LLPartInitData::scale_range, and LLPartInitData::vel_offset.

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeKill_p ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 383 of file partsyspacket.cpp.

References LLPartInitData::distanceDeath, LLPartInitData::killPlaneNormal, LLPartInitData::killPlaneZ, mData, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeLifespan ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 643 of file partsyspacket.cpp.

References LLPartInitData::globalLifetime, LLPartInitData::individualLifetime, LLPartInitData::individualLifetimeRange, mData, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeScale_range ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 481 of file partsyspacket.cpp.

References i, mData, LLPartInitData::scale_range, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeSpawn ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 584 of file partsyspacket.cpp.

References i, mData, LLPartInitData::spawnDirection, LLPartInitData::spawnDirectionRange, LLPartInitData::spawnFreqencyRange, LLPartInitData::spawnFrequency, LLPartInitData::spawnRange, LLPartInitData::spawnVelocity, LLPartInitData::spawnVelocityRange, and twoBytesFromFloat().

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeUUID ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 521 of file partsyspacket.cpp.

References IMG_BIG_EXPLOSION_1, IMG_BIG_EXPLOSION_2, IMG_EXPLOSION, IMG_EXPLOSION_2, IMG_EXPLOSION_3, IMG_EXPLOSION_4, IMG_FIRE, IMG_SHOT, IMG_SMOKE_POOF, IMG_SPARK, LLUUID::mData, mData, and LLPartInitData::mImageUuid.

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeVelocityOffset ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 508 of file partsyspacket.cpp.

References i, mData, twoBytesFromFloat(), and LLPartInitData::vel_offset.

Referenced by fromLLPartInitData().

U32 LLPartSysCompressedPacket::writeWindDiffusionFactor ( LLPartInitData in,
U32  startByte 
) [protected]

Definition at line 686 of file partsyspacket.cpp.

References mData, twoBytesFromFloat(), and LLPartInitData::windDiffusionFactor.

Referenced by fromLLPartInitData().


Member Data Documentation

U8 LLPartSysCompressedPacket::mData[MAX_PART_SYS_PACKET_SIZE] [protected]

Definition at line 218 of file partsyspacket.h.

Referenced by fromLLPartInitData(), fromUnsignedBytes(), getBytePtr(), LLPartSysCompressedPacket(), readAlpha_range(), readAlphaScaleDiffEqn_range(), readBounce_b(), readBounce_p(), readDecayDamp(), readEnvironment(), readKill_p(), readLifespan(), readScale_range(), readSpawn(), readUUID(), readVelocityOffset(), readWindDiffusionFactor(), toLLPartInitData(), toUnsignedBytes(), writeAlpha_range(), writeAlphaScaleDiffEqn_range(), writeBounce_b(), writeBounce_p(), writeDecayDamp(), writeEnvironment(), writeFlagByte(), writeKill_p(), writeLifespan(), writeScale_range(), writeSpawn(), writeUUID(), writeVelocityOffset(), and writeWindDiffusionFactor().

LLPartInitData LLPartSysCompressedPacket::mDefaults [protected]

Definition at line 220 of file partsyspacket.h.

Referenced by LLPartSysCompressedPacket(), and writeFlagByte().

U32 LLPartSysCompressedPacket::mNumBytes [protected]

Definition at line 219 of file partsyspacket.h.

Referenced by bufferSize(), fromLLPartInitData(), fromUnsignedBytes(), and toUnsignedBytes().

LLPartInitData LLPartSysCompressedPacket::mWorkingCopy [protected]

Definition at line 222 of file partsyspacket.h.


The documentation for this class was generated from the following files:
Generated on Thu Jul 1 06:11:38 2010 for Second Life Viewer by  doxygen 1.4.7