#include <brush.h>
Data Structures | |
class | SavedState |
Public Member Functions | |
Face (FaceObserver *observer) | |
Face (const Vector3 &p0, const Vector3 &p1, const Vector3 &p2, const std::string &shader, const TextureProjection &projection, FaceObserver *observer) | |
Face (const Face &other, FaceObserver *observer) | |
~Face () | |
void | planeChanged () |
void | realiseShader () |
void | unrealiseShader () |
void | instanceAttach (MapFile *map) |
void | instanceDetach (MapFile *map) |
void | render (RenderStateFlags state) const |
void | updateFiltered () |
bool | isFiltered () const |
void | undoSave () |
UndoMemento * | exportState () const |
export the current state via UndoMemento | |
void | importState (const UndoMemento *data) |
restore a previously stored memento | |
void | IncRef () |
void | DecRef () |
void | flipWinding () |
bool | intersectVolume (const VolumeTest &volume, const Matrix4 &localToWorld) const |
void | render (Renderer &renderer, const Matrix4 &localToWorld) const |
void | transform (const Matrix4 &matrix, bool mirror) |
void | assign_planepts (const PlanePoints planepts) |
void | revertTransform () |
Reverts the transformable state of the brush to identity. | |
void | freezeTransform () |
void | update_move_planepts_vertex (std::size_t index, PlanePoints planePoints) |
void | snapto (float snap) |
void | testSelect (SelectionTest &test, SelectionIntersection &best) |
void | testSelect_centroid (SelectionTest &test, SelectionIntersection &best) |
void | shaderChanged () |
const std::string & | GetShader () const |
void | SetShader (const std::string &name) |
void | revertTexdef () |
void | texdefChanged () |
void | GetTexdef (TextureProjection &projection) const |
void | SetTexdef (const TextureProjection &projection) |
void | GetFlags (ContentsFlagsValue &flags) const |
Get the content and surface flags from a given face. | |
void | SetFlags (const ContentsFlagsValue &flags) |
void | ShiftTexdef (float s, float t) |
void | ScaleTexdef (float s, float t) |
void | RotateTexdef (float angle) |
void | FitTexture (float s_repeat, float t_repeat) |
void | EmitTextureCoordinates () |
const Vector3 & | centroid () const |
void | construct_centroid () |
const Winding & | getWinding () const |
Winding & | getWinding () |
const Plane3 & | plane3 () const |
FacePlane & | getPlane () |
const FacePlane & | getPlane () const |
FaceTexdef & | getTexdef () |
const FaceTexdef & | getTexdef () const |
FaceShader & | getShader () |
const FaceShader & | getShader () const |
bool | isDetail () const |
void | setDetail (bool detail) |
bool | contributes () const |
bool | is_bounded () const |
Data Fields | |
PlanePoints | m_move_planepts |
PlanePoints | m_move_planeptsTransformed |
Static Public Attributes | |
static QuantiseFunc | m_quantise |
Private Member Functions | |
Face & | operator= (const Face &other) |
Face (const Face &other) | |
Private Attributes | |
std::size_t | m_refcount |
FacePlane | m_plane |
FacePlane | m_planeTransformed |
FaceShader | m_shader |
FaceTexdef | m_texdef |
TextureProjection | m_texdefTransformed |
Winding | m_winding |
Vector3 | m_centroid |
bool | m_filtered |
FaceObserver * | m_observer |
UndoObserver * | m_undoable_observer |
MapFile * | m_map |
Definition at line 755 of file brush.h.
Face::Face | ( | const Face & | other | ) | [private] |
Face::Face | ( | FaceObserver * | observer | ) | [inline] |
Definition at line 806 of file brush.h.
References FaceShader::attach(), FacePlane::copy(), m_plane, m_shader, m_texdef, Plane3::normal(), FacePlane::plane3(), planeChanged(), and FaceTexdef::setBasis().
Face::Face | ( | const Vector3 & | p0, | |
const Vector3 & | p1, | |||
const Vector3 & | p2, | |||
const std::string & | shader, | |||
const TextureProjection & | projection, | |||
FaceObserver * | observer | |||
) | [inline] |
Definition at line 815 of file brush.h.
References FaceShader::attach(), FacePlane::copy(), m_plane, m_shader, m_texdef, Plane3::normal(), FacePlane::plane3(), planeChanged(), FaceTexdef::setBasis(), and updateFiltered().
Face::Face | ( | const Face & | other, | |
FaceObserver * | observer | |||
) | [inline] |
Definition at line 826 of file brush.h.
References FaceShader::attach(), FacePlane::copy(), m_move_planepts, m_plane, m_shader, m_texdef, Plane3::normal(), FacePlane::plane3(), planeChanged(), planepts_assign(), FaceTexdef::setBasis(), and updateFiltered().
Face::~Face | ( | ) | [inline] |
Definition at line 837 of file brush.h.
References FaceShader::detach(), and m_shader.
void Face::assign_planepts | ( | const PlanePoints | planepts | ) | [inline] |
Definition at line 956 of file brush.h.
References FacePlane::copy(), m_observer, m_planeTransformed, and FaceObserver::planeChanged().
Referenced by FaceInstance::snapComponents(), snapto(), and FaceInstance::transformComponents().
const Vector3& Face::centroid | ( | ) | const [inline] |
Definition at line 1139 of file brush.h.
References m_centroid.
Referenced by FaceInstance::centroid().
void Face::construct_centroid | ( | ) | [inline] |
Definition at line 1144 of file brush.h.
References m_centroid, m_winding, and plane3().
bool Face::contributes | ( | ) | const [inline] |
Definition at line 1203 of file brush.h.
References m_winding.
Referenced by FaceInstance::render(), snapto(), and FaceInstance::testSelect_centroid().
void Face::DecRef | ( | ) | [inline] |
Definition at line 918 of file brush.h.
References m_refcount.
void Face::EmitTextureCoordinates | ( | ) | [inline] |
Definition at line 1133 of file brush.h.
References FaceShader::height(), m_shader, m_texdefTransformed, m_winding, Plane3::normal(), plane3(), and FaceShader::width().
Referenced by Brush::buildWindings(), shaderChanged(), and texdefChanged().
UndoMemento* Face::exportState | ( | ) | const [inline, virtual] |
export the current state via UndoMemento
Implements Undoable.
Definition at line 897 of file brush.h.
Referenced by importState().
void Face::FitTexture | ( | float | s_repeat, | |
float | t_repeat | |||
) | [inline] |
Definition at line 1126 of file brush.h.
References FaceTexdef::fit(), m_plane, m_texdef, m_winding, Plane3::normal(), FacePlane::plane3(), texdefChanged(), and undoSave().
void Face::flipWinding | ( | ) | [inline] |
Definition at line 924 of file brush.h.
References m_plane, planeChanged(), and FacePlane::reverse().
void Face::freezeTransform | ( | ) | [inline] |
Definition at line 969 of file brush.h.
References m_move_planepts, m_move_planeptsTransformed, m_plane, m_planeTransformed, FaceTexdef::m_projection, m_texdef, m_texdefTransformed, planepts_assign(), and undoSave().
Referenced by FaceInstance::snapComponents(), and snapto().
void Face::GetFlags | ( | ContentsFlagsValue & | flags | ) | const [inline] |
Get the content and surface flags from a given face.
[in,out] | flags | The content and surface flag container |
Definition at line 1074 of file brush.h.
References FaceShader::getFlags(), ContentsFlagsValue::m_contentFlags, ContentsFlagsValue::m_contentFlagsDirty, ContentsFlagsValue::m_firstValue, ContentsFlagsValue::m_markDirty, m_shader, ContentsFlagsValue::m_surfaceFlags, ContentsFlagsValue::m_surfaceFlagsDirty, ContentsFlagsValue::m_value, and ContentsFlagsValue::m_valueDirty.
const FacePlane& Face::getPlane | ( | ) | const [inline] |
FacePlane& Face::getPlane | ( | ) | [inline] |
Definition at line 1163 of file brush.h.
References m_plane.
Referenced by Face::SavedState::exportState().
const FaceShader& Face::getShader | ( | ) | const [inline] |
FaceShader& Face::getShader | ( | ) | [inline] |
Definition at line 1179 of file brush.h.
References m_shader.
Referenced by Face::SavedState::exportState().
const std::string& Face::GetShader | ( | ) | const [inline] |
Definition at line 1034 of file brush.h.
References FaceShader::getShader(), and m_shader.
const FaceTexdef& Face::getTexdef | ( | ) | const [inline] |
FaceTexdef& Face::getTexdef | ( | ) | [inline] |
Definition at line 1171 of file brush.h.
References m_texdef.
Referenced by Face::SavedState::exportState().
void Face::GetTexdef | ( | TextureProjection & | projection | ) | const [inline] |
Definition at line 1056 of file brush.h.
References m_texdef, and FaceTexdef::normalised().
Winding& Face::getWinding | ( | ) | [inline] |
const Winding& Face::getWinding | ( | ) | const [inline] |
Definition at line 1149 of file brush.h.
References m_winding.
Referenced by Brush::buildWindings(), SelectableEdge::getEdge(), SelectableVertex::getVertex(), FaceInstance::SelectedEdges_foreach(), FaceInstance::selectPlane(), FaceInstance::update_move_planepts_edge(), update_move_planepts_vertex(), FaceInstance::update_move_planepts_vertex2(), and CExportFormatWavefront::visit().
void Face::importState | ( | const UndoMemento * | state | ) | [inline, virtual] |
restore a previously stored memento
state | state that should be restored |
Implements Undoable.
Definition at line 901 of file brush.h.
References FaceObserver::connectivityChanged(), exportState(), m_observer, planeChanged(), FaceObserver::shaderChanged(), texdefChanged(), undoSave(), and updateFiltered().
void Face::IncRef | ( | ) | [inline] |
Definition at line 914 of file brush.h.
References m_refcount.
void Face::instanceAttach | ( | MapFile * | map | ) | [inline] |
Definition at line 856 of file brush.h.
References GlobalFilterSystem(), GlobalUndoSystem(), FaceShader::instanceAttach(), m_map, m_shader, m_undoable_observer, UndoSystem::observer(), and FilterSystem::registerFilterable().
void Face::instanceDetach | ( | MapFile * | map | ) | [inline] |
Definition at line 863 of file brush.h.
References GlobalFilterSystem(), GlobalUndoSystem(), FaceShader::instanceDetach(), m_map, m_shader, m_undoable_observer, UndoSystem::release(), and FilterSystem::unregisterFilterable().
bool Face::intersectVolume | ( | const VolumeTest & | volume, | |
const Matrix4 & | localToWorld | |||
) | const [inline] |
Definition at line 930 of file brush.h.
References plane3(), and VolumeTest::TestPlane().
Referenced by FaceInstance::intersectVolume().
bool Face::is_bounded | ( | ) | const [inline] |
bool Face::isDetail | ( | ) | const [inline] |
Definition at line 1188 of file brush.h.
References BRUSH_DETAIL_MASK, ContentsFlagsValue::m_contentFlags, FaceShader::m_flags, and m_shader.
Referenced by setDetail().
bool Face::isFiltered | ( | ) | const [inline] |
Definition at line 881 of file brush.h.
References m_filtered.
Referenced by FaceInstance::render(), FaceInstance::testSelect(), and FaceInstance::testSelect_centroid().
const Plane3& Face::plane3 | ( | ) | const [inline] |
Definition at line 1158 of file brush.h.
References FaceObserver::evaluateTransform(), m_observer, m_planeTransformed, and FacePlane::plane3().
Referenced by Brush::buildWindings(), construct_centroid(), EmitTextureCoordinates(), intersectVolume(), FaceInstance::selectPlane(), transform(), and Brush::windingForClipPlane().
void Face::planeChanged | ( | ) | [inline] |
Definition at line 842 of file brush.h.
References m_observer, FaceObserver::planeChanged(), and revertTransform().
Referenced by Face(), flipWinding(), importState(), and shaderChanged().
void Face::realiseShader | ( | ) | [inline, virtual] |
Implements FaceShaderObserver.
Definition at line 848 of file brush.h.
References m_observer, and FaceObserver::shaderChanged().
void Face::render | ( | Renderer & | renderer, | |
const Matrix4 & | localToWorld | |||
) | const [inline] |
Definition at line 935 of file brush.h.
References Renderer::addRenderable(), Renderer::eFullMaterials, m_shader, Renderer::SetState(), and FaceShader::state().
void Face::render | ( | RenderStateFlags | state | ) | const [inline] |
Definition at line 872 of file brush.h.
References m_planeTransformed, m_winding, Plane3::normal(), FacePlane::plane3(), and Winding_Draw().
Referenced by FaceInstance::render().
void Face::revertTexdef | ( | ) | [inline] |
Definition at line 1045 of file brush.h.
References FaceTexdef::m_projection, m_texdef, and m_texdefTransformed.
Referenced by texdefChanged().
void Face::revertTransform | ( | ) | [inline] |
Reverts the transformable state of the brush to identity.
Definition at line 963 of file brush.h.
References m_move_planepts, m_move_planeptsTransformed, m_plane, m_planeTransformed, FaceTexdef::m_projection, m_texdef, m_texdefTransformed, and planepts_assign().
Referenced by planeChanged().
void Face::RotateTexdef | ( | float | angle | ) | [inline] |
Definition at line 1119 of file brush.h.
References m_texdef, FaceTexdef::rotate(), texdefChanged(), and undoSave().
void Face::ScaleTexdef | ( | float | s, | |
float | t | |||
) | [inline] |
Definition at line 1112 of file brush.h.
References m_texdef, FaceTexdef::scale(), texdefChanged(), and undoSave().
void Face::setDetail | ( | bool | detail | ) | [inline] |
Definition at line 1192 of file brush.h.
References BRUSH_DETAIL_MASK, isDetail(), ContentsFlagsValue::m_contentFlags, FaceShader::m_flags, m_observer, m_shader, FaceObserver::shaderChanged(), and undoSave().
void Face::SetFlags | ( | const ContentsFlagsValue & | flags | ) | [inline] |
Definition at line 1097 of file brush.h.
References m_observer, m_shader, FaceShader::setFlags(), FaceObserver::shaderChanged(), undoSave(), and updateFiltered().
void Face::SetShader | ( | const std::string & | name | ) | [inline] |
Definition at line 1038 of file brush.h.
References m_shader, FaceShader::setShader(), shaderChanged(), and undoSave().
void Face::SetTexdef | ( | const TextureProjection & | projection | ) | [inline] |
Definition at line 1060 of file brush.h.
References m_texdef, FaceTexdef::setTexdef(), texdefChanged(), and undoSave().
void Face::shaderChanged | ( | ) | [inline] |
Definition at line 1024 of file brush.h.
References Brush_textureChanged(), EmitTextureCoordinates(), m_observer, planeChanged(), FaceObserver::shaderChanged(), and updateFiltered().
Referenced by SetShader().
void Face::ShiftTexdef | ( | float | s, | |
float | t | |||
) | [inline] |
Definition at line 1105 of file brush.h.
References m_texdef, FaceTexdef::shift(), texdefChanged(), and undoSave().
void Face::snapto | ( | float | snap | ) | [inline] |
Definition at line 991 of file brush.h.
References assign_planepts(), contributes(), freezeTransform(), m_plane, FacePlane::plane3(), plane3_valid(), FacePlane::planePoints(), planepts_snap(), update_move_planepts_vertex(), and vector3_snap().
Referenced by FaceInstance::snapto().
void Face::testSelect | ( | SelectionTest & | test, | |
SelectionIntersection & | best | |||
) | [inline] |
Definition at line 1014 of file brush.h.
References m_winding, and Winding_testSelect().
Referenced by FaceInstance::testSelect().
void Face::testSelect_centroid | ( | SelectionTest & | test, | |
SelectionIntersection & | best | |||
) | [inline] |
Definition at line 1019 of file brush.h.
References m_centroid, and SelectionTest::TestPoint().
Referenced by FaceInstance::testSelect_centroid().
void Face::texdefChanged | ( | ) | [inline] |
Definition at line 1049 of file brush.h.
References Brush_textureChanged(), EmitTextureCoordinates(), and revertTexdef().
Referenced by FitTexture(), importState(), RotateTexdef(), ScaleTexdef(), SetTexdef(), and ShiftTexdef().
void Face::transform | ( | const Matrix4 & | matrix, | |
bool | mirror | |||
) | [inline] |
Definition at line 941 of file brush.h.
References FaceShader::height(), m_observer, m_plane, m_planeTransformed, m_shader, m_texdefTransformed, plane3(), FacePlane::plane3(), FaceObserver::planeChanged(), FacePlane::transform(), and FaceShader::width().
Referenced by FaceInstance::transformComponents().
void Face::undoSave | ( | ) | [inline] |
Definition at line 886 of file brush.h.
References MapFile::changed(), m_map, m_undoable_observer, and UndoObserver::save().
Referenced by FitTexture(), freezeTransform(), importState(), RotateTexdef(), ScaleTexdef(), setDetail(), SetFlags(), SetShader(), SetTexdef(), and ShiftTexdef().
void Face::unrealiseShader | ( | ) | [inline, virtual] |
Implements FaceShaderObserver.
void Face::update_move_planepts_vertex | ( | std::size_t | index, | |
PlanePoints | planePoints | |||
) | [inline] |
Definition at line 977 of file brush.h.
References getWinding(), and planepts_quantise().
Referenced by snapto(), and FaceInstance::update_move_planepts_vertex().
void Face::updateFiltered | ( | ) | [inline, virtual] |
Implements Filterable.
Definition at line 877 of file brush.h.
References face_filtered(), and m_filtered.
Referenced by Face(), importState(), SetFlags(), and shaderChanged().
Vector3 Face::m_centroid [private] |
Definition at line 792 of file brush.h.
Referenced by centroid(), construct_centroid(), and testSelect_centroid().
bool Face::m_filtered [private] |
Definition at line 793 of file brush.h.
Referenced by isFiltered(), and updateFiltered().
MapFile* Face::m_map [private] |
Definition at line 797 of file brush.h.
Referenced by instanceAttach(), instanceDetach(), and undoSave().
Definition at line 782 of file brush.h.
Referenced by Face(), freezeTransform(), revertTransform(), FaceInstance::snapComponents(), FaceInstance::update_move_planepts_edge(), FaceInstance::update_move_planepts_vertex(), and FaceInstance::update_move_planepts_vertex2().
Definition at line 783 of file brush.h.
Referenced by freezeTransform(), revertTransform(), FaceInstance::snapComponents(), and FaceInstance::transformComponents().
FaceObserver* Face::m_observer [private] |
Definition at line 795 of file brush.h.
Referenced by assign_planepts(), importState(), plane3(), planeChanged(), realiseShader(), setDetail(), SetFlags(), shaderChanged(), and transform().
FacePlane Face::m_plane [private] |
Definition at line 785 of file brush.h.
Referenced by Face(), FitTexture(), flipWinding(), freezeTransform(), getPlane(), revertTransform(), snapto(), and transform().
FacePlane Face::m_planeTransformed [private] |
Definition at line 786 of file brush.h.
Referenced by assign_planepts(), freezeTransform(), plane3(), render(), revertTransform(), and transform().
QuantiseFunc Face::m_quantise [static] |
Definition at line 780 of file brush.h.
Referenced by Brush::constructStatic().
std::size_t Face::m_refcount [private] |
FaceShader Face::m_shader [private] |
Definition at line 787 of file brush.h.
Referenced by EmitTextureCoordinates(), Face(), GetFlags(), getShader(), GetShader(), instanceAttach(), instanceDetach(), isDetail(), render(), setDetail(), SetFlags(), SetShader(), transform(), and ~Face().
FaceTexdef Face::m_texdef [private] |
Definition at line 788 of file brush.h.
Referenced by Face(), FitTexture(), freezeTransform(), getTexdef(), GetTexdef(), revertTexdef(), revertTransform(), RotateTexdef(), ScaleTexdef(), SetTexdef(), and ShiftTexdef().
TextureProjection Face::m_texdefTransformed [private] |
Definition at line 789 of file brush.h.
Referenced by EmitTextureCoordinates(), freezeTransform(), revertTexdef(), revertTransform(), and transform().
UndoObserver* Face::m_undoable_observer [private] |
Definition at line 796 of file brush.h.
Referenced by instanceAttach(), instanceDetach(), and undoSave().
Winding Face::m_winding [private] |
Definition at line 791 of file brush.h.
Referenced by construct_centroid(), contributes(), EmitTextureCoordinates(), FitTexture(), getWinding(), is_bounded(), render(), and testSelect().