BlankMat 0.1.0
Free open-source 3D texture creation application
Loading...
Searching...
No Matches
Selection Class Reference

Public Member Functions

void GetSelectedVerts (std::vector< unsigned int > &_verts)
 
void GetSelectedVerts (std::set< unsigned int > &_verts)
 
void SelectFace (unsigned int _id, bool _deselect=false)
 
void SelectVert (unsigned int _id, bool _deselect=false)
 
void SelectMesh (Mesh *mesh)
 
void SelectEntity (IEntity *entity)
 
void SelectMaterial (Material *material)
 
void SelectElement (ISelectable *element)
 
void DeselectFace (unsigned int _id)
 
void DeselectVert (unsigned int _id)
 
void DeselectEntity ()
 
void DeselectMesh ()
 
void DeselectMat ()
 
void DeselectElement ()
 
void ClearVertSel ()
 
void ClearFaceSel ()
 
void ClearSelection ()
 
void SetSelectionPivot (glm::vec3 _pivot)
 
glm::vec3 GetSelectionPivot ()
 
void CalcSelPivot ()
 
void SetTool (Tool _sel)
 
void SetSelMode (SelMode _sel)
 
Tool GetTool ()
 
SelMode GetSelMode ()
 
MeshGetSelectedMesh ()
 
IEntityGetSelectedEntity ()
 
MaterialGetSelectedMaterial ()
 
IEntityGetTransformHandle ()
 
ISelectableGetSelectedElement ()
 
bool IsVertSelected (unsigned int _id)
 
bool IsFaceSelected (unsigned int _id)
 
void ToggleSelectionVisibility ()
 
void SetTransformHandle (IEntity *transformHandle)
 
void UpdateTransformHandle ()
 
void Reset ()
 
 Selection ()
 Storage container for information on all selections.
 

Static Public Member Functions

static MeshGetNearestMesh (Scene *scene, float u, float v)
 Returns the nearest mesh to the clicked position.
 
static int GetNearestVert (Scene *scene, float u, float v)
 Returns the nearest vertex to the clicked position.
 
static int GetNearestFace (Scene *scene, float u, float v)
 Returns the nearest face to the clicked position.
 

Public Attributes

std::set< unsigned int > newSelVerts
 
std::set< unsigned int > removedSelVerts
 

Constructor & Destructor Documentation

◆ Selection()

Selection::Selection ( )

Storage container for information on all selections.

Member Function Documentation

◆ CalcSelPivot()

void Selection::CalcSelPivot ( )

◆ ClearFaceSel()

void Selection::ClearFaceSel ( )

◆ ClearSelection()

void Selection::ClearSelection ( )

◆ ClearVertSel()

void Selection::ClearVertSel ( )

◆ DeselectElement()

void Selection::DeselectElement ( )

◆ DeselectEntity()

void Selection::DeselectEntity ( )

◆ DeselectFace()

void Selection::DeselectFace ( unsigned int  _id)

◆ DeselectMat()

void Selection::DeselectMat ( )

◆ DeselectMesh()

void Selection::DeselectMesh ( )

◆ DeselectVert()

void Selection::DeselectVert ( unsigned int  _id)

◆ GetNearestFace()

int Selection::GetNearestFace ( Scene scene,
float  u,
float  v 
)
static

Returns the nearest face to the clicked position.

Parameters
sceneScene to check
uU coordinate onscreen
vV coordinate onscreen
Returns
Selected face index, or -1 if none was found

◆ GetNearestMesh()

Mesh * Selection::GetNearestMesh ( Scene scene,
float  u,
float  v 
)
static

Returns the nearest mesh to the clicked position.

Parameters
sceneScene to check
uU coordinate onscreen
vV coordinate onscreen
Returns
Selected mesh

◆ GetNearestVert()

int Selection::GetNearestVert ( Scene scene,
float  u,
float  v 
)
static

Returns the nearest vertex to the clicked position.

Parameters
sceneScene to check
uU coordinate onscreen
vV coordinate onscreen
Returns
Selected vertex index, or -1 if none was found

◆ GetSelectedElement()

ISelectable * Selection::GetSelectedElement ( )

◆ GetSelectedEntity()

IEntity * Selection::GetSelectedEntity ( )

◆ GetSelectedMaterial()

Material * Selection::GetSelectedMaterial ( )

◆ GetSelectedMesh()

Mesh * Selection::GetSelectedMesh ( )

◆ GetSelectedVerts() [1/2]

void Selection::GetSelectedVerts ( std::set< unsigned int > &  _verts)

◆ GetSelectedVerts() [2/2]

void Selection::GetSelectedVerts ( std::vector< unsigned int > &  _verts)

◆ GetSelectionPivot()

glm::vec3 Selection::GetSelectionPivot ( )

◆ GetSelMode()

SelMode Selection::GetSelMode ( )

◆ GetTool()

Tool Selection::GetTool ( )

◆ GetTransformHandle()

IEntity * Selection::GetTransformHandle ( )

◆ IsFaceSelected()

bool Selection::IsFaceSelected ( unsigned int  _id)

◆ IsVertSelected()

bool Selection::IsVertSelected ( unsigned int  _id)

◆ Reset()

void Selection::Reset ( )

◆ SelectElement()

void Selection::SelectElement ( ISelectable element)

◆ SelectEntity()

void Selection::SelectEntity ( IEntity entity)

◆ SelectFace()

void Selection::SelectFace ( unsigned int  _id,
bool  _deselect = false 
)

◆ SelectMaterial()

void Selection::SelectMaterial ( Material material)

◆ SelectMesh()

void Selection::SelectMesh ( Mesh mesh)

◆ SelectVert()

void Selection::SelectVert ( unsigned int  _id,
bool  _deselect = false 
)

◆ SetSelectionPivot()

void Selection::SetSelectionPivot ( glm::vec3  _pivot)

◆ SetSelMode()

void Selection::SetSelMode ( SelMode  _sel)

◆ SetTool()

void Selection::SetTool ( Tool  _sel)

◆ SetTransformHandle()

void Selection::SetTransformHandle ( IEntity transformHandle)

◆ ToggleSelectionVisibility()

void Selection::ToggleSelectionVisibility ( )

◆ UpdateTransformHandle()

void Selection::UpdateTransformHandle ( )

Member Data Documentation

◆ newSelVerts

std::set<unsigned int> Selection::newSelVerts

◆ removedSelVerts

std::set<unsigned int> Selection::removedSelVerts