Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions | Public Attributes | Friends

BOP_Segment Class Reference

#include <BOP_Segment.h>

List of all members.

Public Member Functions

 BOP_Segment ()
void invert ()
void sort ()
unsigned int getConfig ()

Static Public Member Functions

static bool isIn (unsigned int cfg)
static bool isEdge (unsigned int cfg)
static bool isVertex (unsigned int cfg)
static bool isDefined (unsigned int cfg)
static bool isUndefined (unsigned int cfg)
static unsigned int getEdge (unsigned int cfg)
static BOP_Index getVertex (unsigned int cfg)
static unsigned int createEdgeCfg (unsigned int edge)
static unsigned int createVertexCfg (BOP_Index vertex)
static unsigned int createInCfg ()
static unsigned int createUndefinedCfg ()

Public Attributes

unsigned int m_cfg1
unsigned int m_cfg2
BOP_Index m_v1
BOP_Index m_v2

Friends

std::ostream & operator<< (std::ostream &stream, const BOP_Segment &c)

Detailed Description

Definition at line 39 of file BOP_Segment.h.


Constructor & Destructor Documentation

BOP_Segment::BOP_Segment ( )

Constructs a new segment.

Definition at line 40 of file BOP_Segment.cpp.

References m_cfg1, m_cfg2, and UNDEFINED.


Member Function Documentation

unsigned int BOP_Segment::createEdgeCfg ( unsigned int  edge) [static]

Returns the end segment configuration for the specified relative edge index.

Returns:
end segment configuration for the specified relative edge index

Definition at line 172 of file BOP_Segment.cpp.

Referenced by BOP_splitFace(), and getConfig().

unsigned int BOP_Segment::createInCfg ( ) [static]

Returns the end segment IN configuration.

Returns:
end segment IN configuration

Definition at line 190 of file BOP_Segment.cpp.

Referenced by getConfig().

unsigned int BOP_Segment::createUndefinedCfg ( ) [static]

Returns the end segment UNDEFINED configuration.

Returns:
end segment UNDEFINED configuration

Definition at line 199 of file BOP_Segment.cpp.

References UNDEFINED.

Referenced by BOP_createXS(), and BOP_splitFace().

unsigned int BOP_Segment::createVertexCfg ( BOP_Index  vertex) [static]

Returns the end segment configuration for the specified relative vertex index.

Returns:
end segment configuration for the specified relative vertex index

Definition at line 181 of file BOP_Segment.cpp.

Referenced by BOP_intersectCoplanarFaces(), and BOP_splitFace().

unsigned int BOP_Segment::getConfig ( )

Returns the inner segment configuration.

Returns:
inner segment configuration

Definition at line 208 of file BOP_Segment.cpp.

References createEdgeCfg(), createInCfg(), getEdge(), getVertex(), isEdge(), isUndefined(), isVertex(), m_cfg1, and m_cfg2.

Referenced by BOP_createXS().

unsigned int BOP_Segment::getEdge ( unsigned int  cfg) [static]

Returns the relative edge index from the specified end segment configuration.

Returns:
relative edge index from the specified end segment configuration

Definition at line 154 of file BOP_Segment.cpp.

Referenced by BOP_getPoints(), getConfig(), and triangulate().

BOP_Index BOP_Segment::getVertex ( unsigned int  cfg) [static]

Returns the relative vertex index from the specified end segment configuration.

Returns:
relative vertex index from the specified end segment configuration

Definition at line 163 of file BOP_Segment.cpp.

Referenced by BOP_getPoints(), and getConfig().

void BOP_Segment::invert ( )

Inverts the segment, swapping ends data.

Definition at line 77 of file BOP_Segment.cpp.

References m_cfg1, m_cfg2, m_v1, and m_v2.

Referenced by BOP_createXS(), and sort().

bool BOP_Segment::isDefined ( unsigned int  cfg) [static]

Returns if the specified end segment configuration is DEFINED (not UNDEFINED).

Returns:
true if the specified end segment configuration is DEFINED, false otherwise

Definition at line 136 of file BOP_Segment.cpp.

References UNDEFINED.

Referenced by BOP_getPoints(), BOP_intersectCoplanarFaces(), and BOP_intersectNonCoplanarFaces().

bool BOP_Segment::isEdge ( unsigned int  cfg) [static]

Returns if the specified end segment configuration is EDGE.

Returns:
true if the specified end segment configuration is EDGE, false otherwise

Definition at line 118 of file BOP_Segment.cpp.

Referenced by BOP_getPoints(), getConfig(), and triangulate().

bool BOP_Segment::isIn ( unsigned int  cfg) [static]

Returns if the specified end segment configuration is IN.

Returns:
true if the specified end segment configuration is IN, false otherwise

Definition at line 109 of file BOP_Segment.cpp.

Referenced by triangulate().

bool BOP_Segment::isUndefined ( unsigned int  cfg) [static]

Returns if the specified end segment configuration is UNDEFINED.

Returns:
true if the specified end segment configuration is UNDEFINED, false otherwise

Definition at line 145 of file BOP_Segment.cpp.

References UNDEFINED.

Referenced by getConfig(), and triangulate().

bool BOP_Segment::isVertex ( unsigned int  cfg) [static]

Returns if the specified end segment configuration is VERTEX.

Returns:
true if the specified end segment configuration is VERTEX, false otherwise

Definition at line 127 of file BOP_Segment.cpp.

References UNDEFINED.

Referenced by BOP_getPoints(), BOP_getVertexIndex(), getConfig(), and triangulate().

void BOP_Segment::sort ( )

Sorts the segment according to ends configuration. The criterion to sort is ...

UNDEFINED < VERTEX < EDGE < IN cfg1 > cfg2

so ...

VERTEX(cfg1) => UNDEFINED(cfg2) || VERTEX(cfg2) EDGE(cfg1) => UNDEFINED(cfg2) || VERTEX(cfg2) || EDGE(cfg2) IN(cfg1) => UNDEFINED(cfg2) || VERTEX(cfg2) || EDGE(cfg2) || IN(cfg2)

Definition at line 100 of file BOP_Segment.cpp.

References invert(), m_cfg1, and m_cfg2.

Referenced by BOP_createXS().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  stream,
const BOP_Segment c 
) [friend]

Implements operator <<

Definition at line 245 of file BOP_Segment.cpp.


Member Data Documentation

unsigned int BOP_Segment::m_cfg1
unsigned int BOP_Segment::m_cfg2

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