Castor3D
..
|
Classe de base (abstraite) pour les subdiviseurs. Plus de détails...
Fonctions membres publiques | |
Subdivider () | |
virtual | ~Subdivider () |
void | Subdivide (SubmeshSPtr p_pSubmesh, Castor::Point3r *p_pCenter, bool p_bGenerateBuffers=true, bool p_bThreaded=false) |
void | SetThreadEndFunction (PSubdivisionEndFunction p_pfnSubdivisionEnd, void *p_pArg=nullptr) |
virtual void | Cleanup () |
BufferElementGroupSPtr | AddPoint (real x, real y, real z) |
BufferElementGroupSPtr | AddPoint (Castor::Point3r const &p_v) |
BufferElementGroupSPtr | AddPoint (real *p_v) |
virtual FaceSPtr | AddFace (uint32_t a, uint32_t b, uint32_t c) |
virtual int | IsInMyPoints (Castor::Point3r const &p_vertex) |
uint32_t | GetNbPoints () const |
BufferElementGroupSPtr | GetPoint (uint32_t i) const |
Types protégés | |
typedef void | SubdivisionEndFunction (void *, Subdivider *) |
typedef SubdivisionEndFunction * | PSubdivisionEndFunction |
Fonctions membres protégées | |
virtual void | DoInitialise () |
void | DoSwapBuffers () |
virtual void | DoSubdivide ()=0 |
void | DoSetTextCoords (FaceSPtr p_face, BufferElementGroup const &p_a, BufferElementGroup const &p_b, BufferElementGroup const &p_c, BufferElementGroup &p_d, BufferElementGroup &p_e, BufferElementGroup &p_f) |
void | DoComputeCenterFrom (Castor::Point3r const &p_a, Castor::Point3r const &p_b, Castor::Point3r const &p_ptANormal, Castor::Point3r const &p_ptBNormal, Castor::Point3r &p_ptResult) |
void | DoComputeCenterFrom (Castor::Point3r const &p_a, Castor::Point3r const &p_b, Castor::Point3r const &p_c, Castor::Point3r const &p_ptANormal, Castor::Point3r const &p_ptBNormal, Castor::Point3r const &p_ptCNormal, Castor::Point3r &p_ptResult) |
Fonctions membres protégées statiques | |
static uint32_t | DoSubdivideThreaded (Subdivider *p_pThis) |
Attributs protégés | |
SubmeshSPtr | m_submesh |
The submesh being subdivided. Plus de détails... | |
FacePtrArray | m_arrayFaces |
Castor::Point3r | m_ptDivisionCenter |
std::shared_ptr< std::thread > | m_pThread |
bool | m_bGenerateBuffers |
PSubdivisionEndFunction | m_pfnSubdivisionEnd |
void * | m_pArg |
bool | m_bThreaded |
std::recursive_mutex | m_mutex |
Classe de base (abstraite) pour les subdiviseurs.
|
protected |
|
protected |
Castor3D::Subdivider::Subdivider | ( | ) |
Constructor
[in] | p_submesh | The submesh to subdivide |
|
virtual |
Destructor
|
virtual |
Creates and adds a face to the wanted smoothgroup
[in] | a | The first face's vertex index |
[in] | b | The second face's vertex index |
[in] | c | The third face's vertex index |
[in] | p_sgIndex | The wanted smoothing group index |
BufferElementGroupSPtr Castor3D::Subdivider::AddPoint | ( | real | x, |
real | y, | ||
real | z | ||
) |
Creates and adds a vertex to my list
[in] | x | The vertex X coordinate |
[in] | y | The vertex Y coordinate |
[in] | z | The vertex Z coordinate |
BufferElementGroupSPtr Castor3D::Subdivider::AddPoint | ( | Castor::Point3r const & | p_v | ) |
Adds a vertex to my list
[in] | p_v | The vertex to add |
BufferElementGroupSPtr Castor3D::Subdivider::AddPoint | ( | real * | p_v | ) |
Creates and adds a vertex to my list
[in] | p_v | The vertex coordinates |
|
virtual |
Cleans all member variables, making this divider dummy
|
protected |
|
protected |
|
protectedvirtual |
Initialisation function
|
protected |
|
protectedpure virtual |
|
staticprotected |
|
protected |
uint32_t Castor3D::Subdivider::GetNbPoints | ( | ) | const |
BufferElementGroupSPtr Castor3D::Subdivider::GetPoint | ( | uint32_t | i | ) | const |
|
virtual |
Tests if the given Point3r is in mine
[in] | p_vertex | The vertex to test |
|
inline |
Defines a function to execute when the threaded subdivision ends That function MUST NEITHER destroy the thread NOR the subdivider
[in] | p_pfnSubdivisionEnd | Pointer over the function to execute |
[in] | p_pArg | Optional parameter for the function |
void Castor3D::Subdivider::Subdivide | ( | SubmeshSPtr | p_pSubmesh, |
Castor::Point3r * | p_pCenter, | ||
bool | p_bGenerateBuffers = true , |
||
bool | p_bThreaded = false |
||
) |
Main subdivision function, must be implemented by children classes
[in] | p_pCenter | The point used as center to compute new points |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
The submesh being subdivided.