view
Tweet
hifi: #21512 Mimicry- Partially optimize polyline entities on the wire

Reduce the size of the polyline entity properties on the wire.
This will reduce the bandwidth necessary to transmit them as well as allow for longer polylines to fit in a packet.

Tech Spec:
- Increment the entity packet types version in PacketHeaders.cpp
- Add private methods to PolyLineEntityItem:
bool unpackNormals(const QByteArray& normals);
QByteArray packNormals() const;

bool unpackStrokeColors(const QByteArray& strokeColors);
QByteArray packStrokeColors() const;

- Replace them inside of:
PolyLineEntityItem::readEntitySubclassDataFromBuffer
PolyLineEntityItem::appendSubclassData


NOTE: pack/unpack implementations:
For each of those, pack the size of the vector first and then each of the items.

For Normals:
Use packFloatVec3ToSignedTwoByteFixed and unpackFloatVec3FromSignedTwoByteFixed with radix = 15

For StrokeColor:
Write 3 bytes instead of 3 floats for each color.

Comments & Activity

Labels Saved!

Bids

Login to bid
Who Amount Done in ...
No bids yet.
Login to add fees