-
Notifications
You must be signed in to change notification settings - Fork 0
/
GW_BaseButterfly.h
executable file
·94 lines (71 loc) · 3.25 KB
/
GW_BaseButterfly.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*------------------------------------------------------------------------------*/
/**
* \file GW_BaseButterfly.h
* \brief Definition of class \c GW_BaseButterfly
* \author Gabriel Peyré
* \date 11-27-2002
*/
/*------------------------------------------------------------------------------*/
#ifndef _GW_BASEBUTTERFLY_H_
#define _GW_BASEBUTTERFLY_H_
#include "../gw_core/GW_Config.h"
#include "GW_BaseMesh_ABC.h"
GW_BEGIN_NAMESPACE
/*------------------------------------------------------------------------------*/
/**
* \class GW_BaseButterfly
* \brief A base mesh that uses a buttefly division scheme.
* \author Gabriel Peyré
* \date 11-27-2002
*
* This use another base mesh for the base faces/vertex. Positionate
* the vertice using a subdivision scheme.
*/
/*------------------------------------------------------------------------------*/
class GW_BaseButterfly: public GW_BaseMesh_ABC
{
public:
/*------------------------------------------------------------------------------*/
/** \name Constructor and destructor */
/*------------------------------------------------------------------------------*/
//@{
GW_BaseButterfly( GW_BaseMesh_ABC& StartMesh );
virtual ~GW_BaseButterfly();
//@}
/*------------------------------------------------------------------------------*/
/** \name Overloaded. */
/*------------------------------------------------------------------------------*/
//@{
virtual void BuildBaseMesh( T_QuadTreeNodeVector& BaseNodeVector, T_QuadTreeVertexVector& BaseVertexVector );
virtual GW_QuadTreeNode* GetRelativeSon(GW_QuadTreeNode& Son, GW_QuadTreeVertex& Direction);
virtual void Positionate( GW_QuadTreeNode& CurNode, GW_QuadTreeNode& RootNode,
GW_Vector3D BaryCoord0, GW_Vector3D BaryCoord1, GW_Vector3D BaryCoord2 );
virtual void ConvertToLocalFrame( const GW_Vector3D& Pos, GW_Float& rU, GW_Float& rV );
virtual GW_U32 GetNbrVertex( GW_U32 nDepth );
virtual GW_U32 GetNbrFace( GW_U32 nDepth );
virtual GW_U32 GetNbrEdge( GW_U32 nDepth );
//@}
//-------------------------------------------------------------------------
/** \name Getting information. */
//-------------------------------------------------------------------------
//@{
/** Use this function to set the name of the base mesh in the compressed files. */
virtual const char* GetBaseMeshName()
{ return "GW_BaseButterfly"; }
//@}
GW_Float GetTension() const;
void SetTension(GW_Float rTension);
private:
static void Positionate_Helper( GW_QuadTreeVertex& StencilVert, GW_Float rWeight, void* pChunk );
/** The base mesh used for the begining of the subdivision process. */
GW_BaseMesh_ABC* pStartMesh_;
/** Tension of the scheme. 0 is for classical scheme (8 neighbor stencil). */
GW_Float rTension_;
};
GW_END_NAMESPACE
#endif // _GW_BASEBUTTERFLY_H_
///////////////////////////////////////////////////////////////////////////////
// Copyright (c) Gabriel Peyré
///////////////////////////////////////////////////////////////////////////////
// END OF FILE //
///////////////////////////////////////////////////////////////////////////////