Blender  V3.3
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Freestyle::ViewMap Class Reference

#include <ViewMap.h>

Public Types

typedef vector< ViewEdge * > viewedges_container
 
typedef vector< ViewVertex * > viewvertices_container
 
typedef vector< ViewShape * > viewshapes_container
 
typedef vector< SVertex * > svertices_container
 
typedef vector< FEdge * > fedges_container
 
typedef map< int, int > id_to_index_map
 

Public Member Functions

 ViewMap ()
 
virtual ~ViewMap ()
 
const ViewEdgegetClosestViewEdge (real x, real y) const
 
const FEdgegetClosestFEdge (real x, real y) const
 
viewshapes_containerViewShapes ()
 
viewedges_containerViewEdges ()
 
viewvertices_containerViewVertices ()
 
fedges_containerFEdges ()
 
svertices_containerSVertices ()
 
viewedges_container::iterator viewedges_begin ()
 
viewedges_container::iterator viewedges_end ()
 
int viewedges_size ()
 
ViewShapeviewShape (unsigned id)
 
id_to_index_mapshapeIdToIndexMap ()
 
BBox< Vec3rgetScene3dBBox () const
 
void AddViewShape (ViewShape *iVShape)
 
void AddViewEdge (ViewEdge *iVEdge)
 
void AddViewVertex (ViewVertex *iVVertex)
 
void AddFEdge (FEdge *iFEdge)
 
void AddSVertex (SVertex *iSVertex)
 
void setScene3dBBox (const BBox< Vec3r > &bbox)
 
TVertexCreateTVertex (const Vec3r &iA3D, const Vec3r &iA2D, FEdge *iFEdgeA, const Vec3r &iB3D, const Vec3r &iB2D, FEdge *iFEdgeB, const Id &id)
 
ViewVertexInsertViewVertex (SVertex *iVertex, vector< ViewEdge * > &newViewEdges)
 
virtual void Clean ()
 

Static Public Member Functions

static ViewMapgetInstance ()
 

Public Attributes

voiduserdata
 

Detailed Description

Class defining the ViewMap.

Definition at line 46 of file ViewMap.h.

Member Typedef Documentation

◆ fedges_container

Definition at line 52 of file ViewMap.h.

◆ id_to_index_map

Definition at line 53 of file ViewMap.h.

◆ svertices_container

Definition at line 51 of file ViewMap.h.

◆ viewedges_container

Definition at line 48 of file ViewMap.h.

◆ viewshapes_container

Definition at line 50 of file ViewMap.h.

◆ viewvertices_container

Definition at line 49 of file ViewMap.h.

Constructor & Destructor Documentation

◆ ViewMap()

Freestyle::ViewMap::ViewMap ( )
inline

Default constructor.

Definition at line 74 of file ViewMap.h.

References NULL, and userdata.

◆ ~ViewMap()

Freestyle::ViewMap::~ViewMap ( )
virtual

Destructor.

Definition at line 28 of file ViewMap.cpp.

Member Function Documentation

◆ AddFEdge()

void Freestyle::ViewMap::AddFEdge ( FEdge iFEdge)
inline

Definition at line 168 of file ViewMap.h.

◆ AddSVertex()

void Freestyle::ViewMap::AddSVertex ( SVertex iSVertex)
inline

Definition at line 173 of file ViewMap.h.

Referenced by CreateTVertex().

◆ AddViewEdge()

void Freestyle::ViewMap::AddViewEdge ( ViewEdge iVEdge)
inline

Definition at line 158 of file ViewMap.h.

◆ AddViewShape()

void Freestyle::ViewMap::AddViewShape ( ViewShape iVShape)

Definition at line 82 of file ViewMap.cpp.

References Freestyle::Id::getFirst(), and Freestyle::ViewShape::getId().

◆ AddViewVertex()

void Freestyle::ViewMap::AddViewVertex ( ViewVertex iVVertex)
inline

Definition at line 163 of file ViewMap.h.

Referenced by CreateTVertex().

◆ Clean()

void Freestyle::ViewMap::Clean ( )
virtual

Definition at line 49 of file ViewMap.cpp.

Referenced by Freestyle::Controller::DeleteViewMap().

◆ CreateTVertex()

TVertex * Freestyle::ViewMap::CreateTVertex ( const Vec3r iA3D,
const Vec3r iA2D,
FEdge iFEdgeA,
const Vec3r iB3D,
const Vec3r iB2D,
FEdge iFEdgeB,
const Id id 
)

◆ FEdges()

fedges_container& Freestyle::ViewMap::FEdges ( )
inline

◆ getClosestFEdge()

const FEdge * Freestyle::ViewMap::getClosestFEdge ( real  x,
real  y 
) const

Gets the Fedge the nearest to the 2D position specified as argument

Definition at line 88 of file ViewMap.cpp.

References A, B, Freestyle::x, and y.

◆ getClosestViewEdge()

const ViewEdge * Freestyle::ViewMap::getClosestViewEdge ( real  x,
real  y 
) const

Gets the viewedge the nearest to the 2D position specified as argument

Definition at line 107 of file ViewMap.cpp.

References A, B, Freestyle::FEdge::viewedge(), Freestyle::x, and y.

◆ getInstance()

static ViewMap* Freestyle::ViewMap::getInstance ( )
inlinestatic

The ViewMap is a singleton class. This static method returns the instance of the ViewMap.

Definition at line 91 of file ViewMap.h.

Referenced by Freestyle::Operators::reset(), and Freestyle::FEdge::z_discontinuity().

◆ getScene3dBBox()

BBox<Vec3r> Freestyle::ViewMap::getScene3dBBox ( ) const
inline

Returns the scene 3D bounding box.

Definition at line 150 of file ViewMap.h.

Referenced by Freestyle::FEdge::z_discontinuity().

◆ InsertViewVertex()

ViewVertex * Freestyle::ViewMap::InsertViewVertex ( SVertex iVertex,
vector< ViewEdge * > &  newViewEdges 
)

◆ setScene3dBBox()

void Freestyle::ViewMap::setScene3dBBox ( const BBox< Vec3r > &  bbox)
inline

Sets the scene 3D bounding box.

Definition at line 179 of file ViewMap.h.

Referenced by Freestyle::Controller::ComputeViewMap().

◆ shapeIdToIndexMap()

id_to_index_map& Freestyle::ViewMap::shapeIdToIndexMap ( )
inline

Definition at line 144 of file ViewMap.h.

◆ SVertices()

svertices_container& Freestyle::ViewMap::SVertices ( )
inline

Definition at line 121 of file ViewMap.h.

Referenced by Freestyle::ViewMapBuilder::ComputeSweepLineIntersections().

◆ ViewEdges()

viewedges_container& Freestyle::ViewMap::ViewEdges ( )
inline

◆ viewedges_begin()

viewedges_container::iterator Freestyle::ViewMap::viewedges_begin ( )
inline

Definition at line 127 of file ViewMap.h.

◆ viewedges_end()

viewedges_container::iterator Freestyle::ViewMap::viewedges_end ( )
inline

Definition at line 132 of file ViewMap.h.

◆ viewedges_size()

int Freestyle::ViewMap::viewedges_size ( )
inline

Definition at line 137 of file ViewMap.h.

Referenced by Freestyle::Controller::ComputeViewMap().

◆ viewShape()

ViewShape * Freestyle::ViewMap::viewShape ( unsigned  id)

◆ ViewShapes()

viewshapes_container& Freestyle::ViewMap::ViewShapes ( )
inline

Definition at line 97 of file ViewMap.h.

◆ ViewVertices()

viewvertices_container& Freestyle::ViewMap::ViewVertices ( )
inline

Definition at line 109 of file ViewMap.h.

Referenced by Freestyle::ViewMapBuilder::ComputeIntersections().

Member Data Documentation

◆ userdata

void* Freestyle::ViewMap::userdata

A field that can be used by the user to store any data. This field must be reset afterwards using ResetUserData().

Definition at line 71 of file ViewMap.h.

Referenced by ViewMap().


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