SOBYTESTREAM(3iv)
π SoByteStream β a whole manual page, bestie π
okay so. you know how sometimes you need to squish an entire scene graph into a lil pile of bytes and then un-squish it later?? that's literally this class. it's from the 3IV manual section, and it's genuinely iconic. let's get into it π«Ά
πΈ INHERITS FROM πΈ
SoByteStream β that's it, that's the whole inheritance tree, she's self-made π
β¨ SYNOPSIS β¨
#include <Inventor/misc/SoByteStream.h>
Methods from class SoByteStream:
SoByteStream()
~SoByteStream()
void convert(SoNode *node, SbBool binaryFormat = TRUE)
void convert(SoPath *path, SbBool binaryFormat = TRUE)
void convert(SoPathList *pathList, SbBool binaryFormat =
TRUE)
void * getData()
uint32_t getNumBytes()
static SoPathList * unconvert(SoByteStream *byteStream)
static SoPathList * unconvert(void *data, uint32_t numBytes)
π¦ DESCRIPTION π¦
So listen. This class creates a byte stream representation of a scene graph, and it does it using an SoWriteAction to write path lists into an in-memory buffer. That's the whole trick, no cap β¨
Byte streams are commonly used to transfer data in copy and paste operations. (The SoXtClipboard class passes SoByteStream data during copy and paste.) so yeah β when you hit ctrl+c on some 3D scene and it just works, this is the girl behind the curtain π
π METHODS π
SoByteStream()
~SoByteStream()
SoByteStream()and~SoByteStream()β the constructor and the destructor. birth and rebirth, main character arc fr fr π
void convert(SoNode *node, SbBool binaryFormat = TRUE)
void convert(SoPath *path, SbBool binaryFormat = TRUE)
void convert(SoPathList *pathList, SbBool binaryFormat =
TRUE)
- These convert the scene graph object(s) you pass in into a byte stream. The caller may specify whether the byte stream is written in binary (
TRUE) or ASCII (FALSE) format β and you can hand over the object(s) bynode, bypath, or bypathList. three flavors, pick your vibe π
void * getData()
uint32_t getNumBytes()
- These return the data and the number of bytes from the last
convert()operation. This byte stream format is well suited to data transfers, like copy and paste. she was built for the clipboard lifestyle π
static SoPathList * unconvert(SoByteStream *byteStream)
static SoPathList * unconvert(void *data, uint32_t numBytes)
- These take byte stream data and unconvert it back into scene graph objects. The objects come back to you in a path list. it's giving resurrection, it's giving reversible, we love a round trip π₯
π SEE ALSO π
- SoXtClipboard
lowkey a perfect little page ngl. everything's here, nothing's missing, and now you know how the clipboard does its thing π
SoByteStream, from the 3IV manual, footer version SoByteStream(3IV)() β that's the source/version stamp and the date tag on this page, and that's a wrap bestie, ily, go convert something β¨ππ¦
π¦ where this page comes from
- debian bookworm: inventor-doc 2.1.5-10+dfsg-2 Β· LGPL-2.0-or-later
- debian trixie: inventor-doc 2.1.6+ds-2 Β· LGPL-2.0-or-later
- ubuntu jammy: inventor-doc 2.1.5-10-24
- ubuntu noble: inventor-doc 2.1.5-10+dfsg-2.1build2 Β· LGPL-2.0-or-later
- ubuntu questing: inventor-doc 2.1.6+ds-2
- ubuntu resolute: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- ubuntu stonking: inventor-doc 2.1.6.1+ds-1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms