2013-01-08 07:21:50 +08:00
|
|
|
#ifndef FOUG_CPP_LIBSTL_STLA_H
|
|
|
|
#define FOUG_CPP_LIBSTL_STLA_H
|
2012-02-29 03:27:32 +08:00
|
|
|
|
|
|
|
#include "stl_global.h"
|
|
|
|
#include "abstract_geometry.h"
|
2012-07-05 18:56:25 +08:00
|
|
|
#include "../io_base.h"
|
2012-02-29 03:27:32 +08:00
|
|
|
#include <string>
|
|
|
|
|
|
|
|
namespace foug {
|
2012-07-05 18:56:25 +08:00
|
|
|
namespace stla {
|
2012-02-29 03:27:32 +08:00
|
|
|
|
|
|
|
class FOUG_STL_EXPORT AbstractGeometryBuilder
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual void beginSolid(const std::string& name);
|
2012-07-05 18:56:25 +08:00
|
|
|
virtual void nextTriangle(const stl::Triangle& triangle) = 0;
|
2012-02-29 03:27:32 +08:00
|
|
|
virtual void endSolid(const std::string& name);
|
|
|
|
};
|
|
|
|
|
|
|
|
class FOUG_STL_EXPORT Io : public IoBase
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Io(AbstractStream* stream = 0);
|
|
|
|
|
|
|
|
bool read(AbstractGeometryBuilder* builder, Int64 streamSize = -1);
|
2012-07-05 18:56:25 +08:00
|
|
|
bool write(const stl::AbstractGeometry& geom, const std::string& solidName);
|
2012-02-29 03:27:32 +08:00
|
|
|
};
|
|
|
|
|
2012-07-05 18:56:25 +08:00
|
|
|
} // namespace stla
|
2012-02-29 03:27:32 +08:00
|
|
|
} // namespace foug
|
|
|
|
|
2013-01-08 07:21:50 +08:00
|
|
|
#endif // FOUG_CPP_LIBSTL_STLA_H
|