Polygon Crucher SDK - Documentation
Documentation
Loading...
Searching...
No Matches
3DCurve.h
Go to the documentation of this file.
1//! @file 3DCurve.h
2//! @brief C3DCurve class for handling 3D curve object
3//!
4//////////////////////////////////////////////////////////////////////
5
6#if !defined(AFX_3DCURVE_H__31D6A936_B14E_11D2_A1E5_000000000000__INCLUDED_)
7#define AFX_3DCURVE_H__31D6A936_B14E_11D2_A1E5_000000000000__INCLUDED_
8
9#ifdef _MSC_VER
10#pragma once
11#endif // _MSC_VER
12
13#include "3DGeomObject.h"
14
15BEGIN_MOOTOOLS_NAMESPACE
16
17//! @class C3DCurve
18//! @brief A 3D curve is a list of C3DPoint. It has specific flags and material.
19class DLL_3DFUNCTION C3DCurve : public C3DGeomObject
20{
21 friend CGeomInfo;
22
23protected:
24 MaterialID materialid;
25 unsigned int curveType;
26
27public:
28 DECLARE_SERIAL_XOBJECT(C3DCurve);
29
30 //! @enum CurveType
31 //! @brief Defines the type of the curve and some particular flags
32 typedef enum CurveType XEnumType(unsigned int)
33 {
34 CURVE_TYPE = 0xFF,
35 CURVE_STRIP_LINE = 0, //!< @brief Default type, if not specified. Line is compound of connected points [#0-#1, #1-#2...]
36 CURVE_SEGMENT_LINE, //!< @brief Line is compound of segment [#0-#1, #2-#3...]
37 CURVE_FLAGS = 0xFF00,
38 CURVE_LOOP = 0x1000 //!< @brief Strip line is closed.
39 } CurveType;
40
41 C3DCurve();
42 virtual ~C3DCurve();
43 virtual void Serialize( CXArchive& ar );
44
45 void SetCurveInfo(unsigned int curveTypeAndFlags) //!< @brief Set the curve type and flags. Cf. #CurveType
46 {
47 curveType = curveTypeAndFlags;
48 }
49
50 unsigned int GetCurveFlags() const //!< @brief Return the curve flags. cf. #CurveType
51 {
52 return (curveType & CURVE_FLAGS);
53 }
54
55 CurveType GetCurveType() const //!< @brief Return the curve type. Cf. #CurveType
56 {
57 return (CurveType)(curveType & CURVE_TYPE);
58 }
59
60 void SetMaterialID(MaterialID id); //!< Set the curve material using its MaterialID
61 MaterialID GetMaterialID() const; //!< Get the curve MaterialID
62
63 // Virtuals
64 virtual bool InternalCopy(C3DBaseObject*& dstObject, int flags = OBJECT_COPY_DEFAULT, C3DObjectCreator* objectCreator = NULL) const;
65};
66
67END_MOOTOOLS_NAMESPACE
68
69#endif // !defined(AFX_3DCURVE_H__31D6A936_B14E_11D2_A1E5_000000000000__INCLUDED_)
This is the base class for any kind of object.
Definition 3DBaseObject.h:106
A 3D curve is a list of C3DPoint. It has specific flags and material.
Definition 3DCurve.h:20
unsigned int GetCurveFlags() const
<
Definition 3DCurve.h:50
void SetMaterialID(MaterialID id)
Set the curve material using its MaterialID.
CurveType GetCurveType() const
<
Definition 3DCurve.h:55
MaterialID GetMaterialID() const
Get the curve MaterialID.
CurveType
Defines the type of the curve and some particular flags.
Definition 3DCurve.h:33
@ CURVE_SEGMENT_LINE
Line is compound of segment [#0-#1, #2-#3...].
Definition 3DCurve.h:36
This is the base class for any object containing geometry (curve, polygonal object,...
Definition 3DGeomObject.h:49
This class can be provided in C3DScene::Copy operations and allows to modify the created kind of clas...
Definition 3DScene.h:47
The class defines an x, y, z 3D point which can use int, float or double.
Definition 3DPoint.h:27
CGeomInfo is an helper class oftenly required by different methods.
Definition GeomInfo.h:71
Definition XArchive.h:17