 |
AGXDynamics
2.35.0.3
|
Go to the documentation of this file.
174 virtual std::ostream&
write(std::ostream& str);
180 virtual std::istream&
read(std::istream& str);
182 inline Mode getMode()
const;
193 virtual void read(
char& val);
194 virtual void read(
bool& val);
197 virtual void read(
float& val,
bool readAsFloat =
false);
199 virtual void read(
double& val,
bool readAsFloat =
false);
201 virtual void read(std::string& val);
227 virtual void write(
char val);
228 virtual void write(
bool val);
232 virtual void write(
float val, FloatMode writeAsFloat = AS_FLOAT);
235 virtual void write(
double val, FloatMode writeAsFloat = AS_DOUBLE);
237 virtual void write(
const std::string& val);
240 virtual void write(
const agx::Vec3d& val, FloatMode writeAsFloat = AS_DOUBLE);
243 virtual void write(
const agx::Vec3f& val, FloatMode writeAsFloat = AS_DOUBLE);
246 virtual void write(
const agx::Quat64& val, FloatMode writeAsFloat = AS_DOUBLE);
249 virtual void write(
const agx::Quat32& val, FloatMode writeAsFloat = AS_DOUBLE);
264 void beginBlock(
const char* blockName);
270 bool endBlock(
const char* blockName);
272 void skipBlock(
const char* blockName);
295 const char* m_blockName;
310 std::stringstream &getStream();
311 const std::stringstream &getStream()
const;
316 void readHeader(std::istream& str);
317 void writeHeader(std::ostream& str,
const char* data);
322 void checkMode(Mode newMode);
336 StorageStack(std::shared_ptr<std::stringstream>
root);
340 virtual ~StorageStack();
343 std::string name()
const;
346 std::shared_ptr<std::stringstream> top();
348 std::shared_ptr<const std::stringstream> top()
const;
351 uint32_t size() {
return uint32_t(m_stack.size()); }
354 void push(
const std::string& blockName, std::shared_ptr<std::stringstream>);
360 void clear(std::shared_ptr <std::stringstream>
root);
364 std::shared_ptr<std::stringstream> getNewStream();
371 void writeBuffer(
const char* data,
size_t numBytes, std::stringstream* stream);
373 typedef std::stack<std::pair<std::string, std::shared_ptr<std::stringstream> > > StreamStack;
375 std::shared_ptr<std::stringstream> m_root;
376 std::stack<std::shared_ptr<std::stringstream> > m_streamPool;
390 agx::UInt8 m_generation, m_major, m_minor, m_patch;
397 std::shared_ptr<std::stringstream> m_data;
400 StorageStack m_stack;
450 uint64_t readVal = 0;
452 val = size_t(readVal);
459 uint64_t readVal = 0;
567 out.write(int32_t(val));
573 out.write(uint64_t(val));
580 out.write(uint64_t(val));
Ties a beginBlock/endBlock pair to a scope.
@ ERROR_READING_FROM_INSTREAM
@ ERROR_WRITING_TO_OUTSTREAM
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive.
The rigid body class, combining a geometric model and a frame of reference.
@ ERROR_WRITING_TO_DATASTREAM
Matrix class for rigid transformations (translation, rotation).
Abstract base class for storing/restoring a line/drums with version control.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Implements a Wire model with adaptive resolution.
bool write(agx::Vector< char > &buffer)
Write data from the stream into the buffer for external storage.
InputArchive & operator>>(InputArchive &in, InputVal< T > val)
OutputArchive & operator<<(OutputArchive &out, OutputRef< T > val)
The geometry representation used by the collision detection engine.
@ ERROR_READING_FROM_DATASTREAM
bool AGXPHYSICS_EXPORT write(const std::string &filename, const agxStream::Serializable *data)
Write a Serializable object to a file.
The object holding quaternions and providing operations on these.
AGXCORE_EXPORT Component * root()
void setEnableMD5(bool flag)
Enable/Disable the MD5 check of the data.
bool read(const agx::Vector< char > &buffer)
Read data from the buffer into the stream for restore.
This namespace consists of a set of classes for handling geometric intersection tests including boole...
bool AGXPHYSICS_EXPORT read(const std::string &filename, agxStream::SerializablePtrVector &readObjects)
Open and read serializable objects from a file on disk with previously stored objects.
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
StorageStream(const StorageStream &)
A class holding 3 dimensional vectors and providing basic arithmetic.
AGXTERRAIN_EXPORT void clear()
Class defining a node that is part of a wire.
bool getEnableMD5() const