12 # ifdef WITH_BOOST_1_36
15 # include <boost/serialization/split_member.hpp>
43 Geometry(
GeometryType t) :
type(t),
color(0, 0, 0),
radius(0),
center(0, 0, 0),
rotation(1, 0, 0, 0, 1, 0, 0, 0, 1) {}
54 template<
class Archive>
80 template<
class Archive>
116 template<
class Archive>
156 template<
class Archive>
283 template<
class Archive>
284 void load(Archive & ar,
const unsigned int )
286 ar & boost::serialization::base_object<S_ObjectNormalized>(*
this);
292 template<
class Archive>
293 void save(Archive & ar,
const unsigned int )
const
295 ar & boost::serialization::base_object<S_ObjectNormalized>(*
this);
310 BOOST_SERIALIZATION_SPLIT_MEMBER()
333 std::vector<
Point3> & res) const;
348 std::vector<
Point3> & res,
362 const
Point3 & l2p2) const;
SCH_API void loadTreeFromFile(const std::string &treefilename, ArchiveType type=TEXT_ARCHIVE)
Load the tree structure of the object from a file.
virtual SCH_API Point3 supportFarthestNeighbour(const Vector3 &v, int &lastFeature) const
SCH_API int getFeaturesNumber() const
returns the vertex number in the STP-BV
virtual SCH_API Point3 supportFarthestNeighbourPrime(const Vector3 &v, int &lastFeature) const
SCH_API void computeConePointsBetween(const Point3 &p1, const Point3 &p2, Vector3 axis, int step, std::vector< Point3 > &res, Matrix3x3 &homo)
Computes the points of.
virtual SCH_API Point3 supportHybrid(const Vector3 &v, int &lastFeature) const
SCH_API void printSupportTree(std::string filename) const
Print the support tree in a file.
SCH_API Point3 computeCenter(const std::vector< Point3 > &points)
Computes the center of a surface defined by a list of points.
int m_patchesSize
Definition: STP_BV.h:381
void save(Archive &ar, const unsigned int) const
Definition: STP_BV.h:293
SCH_API void addPatch(STP_Feature *patch)
Adds a bouding volume to the object.
virtual SCH_API Point3 l_Support(const Vector3 &v, int &lastFeature) const
gives the support point for a given vector in local cordinates and a given last feature....
virtual SCH_API S_ObjectType getType() const
must be overloaded to return the type
virtual SCH_API Scalar supportH(const Vector3 &v) const
STP_Feature ** m_fastPatches
Definition: STP_BV.h:379
SCH_API STP_BV(const STP_BV &)
SCH_API void updateFastPatches()
Updates the dynamical array fastPatches. Must be called after each patches modification.
Scalar getBigRadius() const
Definition: STP_BV.h:300
virtual SCH_API void constructFromFile(const std::string &filename)
Constructs the object from a file describing its STP_BV decomposition.
std::vector< STP_Feature * > m_patches
Definition: STP_BV.h:377
virtual SCH_API bool ray_cast(const Point3 &source, const Point3 &target, Scalar ¶m, Vector3 &normal) const
I don't know.
SCH_API Point3 computeLinesCommonPoint(const Point3 &l1p1, const Point3 &l1p2, const Point3 &l2p1, const Point3 &l2p2) const
Computes the intersection of two segments.
SCH_API void computeArcPointsBetween(const Point3 &p1, const Point3 &p2, const Point3 ¢er, int step, std::vector< Point3 > &res) const
Computes the points of an arc.
virtual SCH_API void constructFromFileWithGL(const std::string &filename)
Definition: STP_BV.h:188
void load(Archive &ar, const unsigned int)
Definition: STP_BV.h:284
Scalar _r
Definition: STP_BV.h:382
Scalar _R
Definition: STP_BV.h:382
SCH_API void saveTreeInFile(const std::string &treefilename, ArchiveType type=TEXT_ARCHIVE)
virtual SCH_API STP_BV * clone() const
Returns a copy of this S_Object.
const std::vector< sch::Geometry > & getGeometries() const
virtual SCH_API void saveToBinary(const std::string &filename)
Save the object to a binary archive.
virtual SCH_API void loadFromBinary(const std::string &filename)
Load the object from a binary archive.
STP_Feature ** m_lastPatches
Definition: STP_BV.h:380
virtual SCH_API STP_BV & operator=(const STP_BV &)
virtual SCH_API ~STP_BV(void)
virtual SCH_API Point3 supportFirstNeighbour(const Vector3 &v, int &lastFeature) const
virtual SCH_API Point3 supportFirstNeighbourPrime(const Vector3 &v, int &lastFeature) const
gives the support for a vector using the First neighbour method.
virtual SCH_API Point3 supportNaive(const Vector3 &v) const
std::vector< Geometry > geometries_
Definition: STP_BV.h:384
Scalar getSmallRadius() const
Definition: STP_BV.h:305
Definition: STP_Feature.h:103
Definition: S_ObjectNormalized.h:16
S_ObjectType
type of a solid object. Don't use it to cast !
Definition: S_Object.h:234
struct sch::s_Triangle Triangle
struct sch::s_toruslinkedBV toruslinkedBV
double Scalar
Definition: SCH_Types.h:23
struct sch::s_SphereApproxim SphereApproxim
struct sch::s_PointsComparator PointsComparator
ArchiveType
Definition: STP_BV.h:21
@ BINARY_ARCHIVE
Definition: STP_BV.h:22
@ TEXT_ARCHIVE
Definition: STP_BV.h:23
#define SCH_API
Definition: sch_api.h:13
Matrix3x3 rotation
Definition: STP_BV.h:39
std::vector< Vector3 > normal
Definition: STP_BV.h:41
GeometryType type
Definition: STP_BV.h:35
Scalar radius
Definition: STP_BV.h:37
std::vector< Vector3 > vertex
Definition: STP_BV.h:40
GeometryType
Definition: STP_BV.h:29
@ SPHERE
Definition: STP_BV.h:32
@ LINE
Definition: STP_BV.h:30
@ TRIANGLE
Definition: STP_BV.h:31
Geometry(GeometryType t)
Definition: STP_BV.h:43
Point3 color
Definition: STP_BV.h:36
Point3 center
Definition: STP_BV.h:38
Functor.
Definition: STP_BV.h:136
bool operator()(unsigned int id1, unsigned int id2) const
operator parenthesis
Point3 m_axis
Definition: STP_BV.h:162
s_PointsComparator()
Default constructor.
void serialize(Archive &ar, const unsigned int)
Definition: STP_BV.h:157
void setData(const Point3 &axis, const std::vector< Point3 > &points)
Constructor.
std::vector< Point3 > m_points
Definition: STP_BV.h:163
Functor.
Definition: STP_BV.h:99
Scalar m_sphereRadius
Definition: STP_BV.h:125
void operator()(const Triangle &vertices, const int ¤tStep) const
operator parenthesis
Point3 m_sphereCenter
Definition: STP_BV.h:124
int m_step
Definition: STP_BV.h:123
void serialize(Archive &ar, const unsigned int)
Definition: STP_BV.h:117
s_SphereApproxim(std::vector< Point3 > &vertices, int step, const Point3 &sphereCenter, double sphereRadius)
Constructor.
std::vector< Point3 > & m_vertices
Definition: STP_BV.h:122
Defines a triangle.
Definition: STP_BV.h:67
s_Triangle()
Default constructor.
Definition: STP_BV.h:71
Point3 m_vertex1
Definition: STP_BV.h:86
Point3 m_vertex3
Definition: STP_BV.h:88
Point3 m_vertex2
Definition: STP_BV.h:87
void serialize(Archive &ar, const unsigned int)
Definition: STP_BV.h:81
s_Triangle(const Point3 &vertex1, const Point3 &vertex2, const Point3 &vertex3)
Constructor.
Stores the IDs of the BV to which a torus is linked.
Definition: STP_BV.h:52
int buffer[4]
Definition: STP_BV.h:53
void serialize(Archive &ar, const unsigned int)
Definition: STP_BV.h:55