Face Class Reference

#include <brush.h>

Inheritance diagram for Face:
Inheritance graph
[legend]
Collaboration diagram for Face:
Collaboration graph
[legend]

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 ()
UndoMementoexportState () 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::stringGetShader () 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 Vector3centroid () const
void construct_centroid ()
const Winding & getWinding () const
Winding & getWinding ()
const Plane3plane3 () const
FacePlanegetPlane ()
const FacePlanegetPlane () const
FaceTexdefgetTexdef ()
const FaceTexdefgetTexdef () const
FaceShadergetShader ()
const FaceShadergetShader () 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

Faceoperator= (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
FaceObserverm_observer
UndoObserverm_undoable_observer
MapFilem_map

Detailed Description

Definition at line 755 of file brush.h.


Constructor & Destructor Documentation

Face::Face ( const Face other  )  [private]
Face::Face ( FaceObserver observer  )  [inline]
Face::Face ( const Vector3 p0,
const Vector3 p1,
const Vector3 p2,
const std::string shader,
const TextureProjection &  projection,
FaceObserver observer 
) [inline]
Face::Face ( const Face other,
FaceObserver observer 
) [inline]
Face::~Face (  )  [inline]

Definition at line 837 of file brush.h.

References FaceShader::detach(), and m_shader.


Member Function Documentation

void Face::assign_planepts ( const PlanePoints  planepts  )  [inline]
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]
UndoMemento* Face::exportState (  )  const [inline, virtual]

export the current state via UndoMemento

Returns:
a memento that represents current state

Implements Undoable.

Definition at line 897 of file brush.h.

Referenced by importState().

void Face::FitTexture ( float  s_repeat,
float  t_repeat 
) [inline]
void Face::flipWinding (  )  [inline]

Definition at line 924 of file brush.h.

References m_plane, planeChanged(), and FacePlane::reverse().

void Face::freezeTransform (  )  [inline]
void Face::GetFlags ( ContentsFlagsValue flags  )  const [inline]

Get the content and surface flags from a given face.

Note:
Also generates a diff bitmask of the flag variable given to store the flag values in and the current face flags
Parameters:
[in,out] flags The content and surface flag container
See also:
ContentsFlagsValue_assignMasked

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]

Definition at line 1167 of file brush.h.

References m_plane.

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]

Definition at line 1183 of file brush.h.

References m_shader.

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]

Definition at line 1175 of file brush.h.

References m_texdef.

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]

Definition at line 1153 of file brush.h.

References m_winding.

const Winding& Face::getWinding (  )  const [inline]
void Face::importState ( const UndoMemento state  )  [inline, virtual]

restore a previously stored memento

Parameters:
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]
void Face::instanceDetach ( MapFile map  )  [inline]
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]

Definition at line 1207 of file brush.h.

References i, and m_winding.

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]
Face& Face::operator= ( const Face other  )  [private]
const Plane3& Face::plane3 (  )  const [inline]
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]
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]
void Face::SetFlags ( const ContentsFlagsValue flags  )  [inline]
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]
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]
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]
void Face::transform ( const Matrix4 &  matrix,
bool  mirror 
) [inline]
void Face::undoSave (  )  [inline]
void Face::unrealiseShader (  )  [inline, virtual]

Implements FaceShaderObserver.

Definition at line 852 of file brush.h.

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().


Field Documentation

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 786 of file brush.h.

Referenced by assign_planepts(), freezeTransform(), plane3(), render(), revertTransform(), and transform().

Definition at line 780 of file brush.h.

Referenced by Brush::constructStatic().

std::size_t Face::m_refcount [private]

Definition at line 757 of file brush.h.

Referenced by DecRef(), and IncRef().

TextureProjection Face::m_texdefTransformed [private]

Definition at line 796 of file brush.h.

Referenced by instanceAttach(), instanceDetach(), and undoSave().

Winding Face::m_winding [private]

The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2