hed::Node Class Reference

Node class for data structures (Inherits from HandleId) More...

#include <ttl/halfedge/HeTriang.h>

Inheritance diagram for hed::Node:
HandleId

List of all members.

Public Member Functions

 Node ()
 Default constructor.
 Node (double x, double y, double z=0.0)
 Constructor.
 ~Node ()
 Destructor.
void init (double x, double y, double z)
 Initialize the position.
const double & x () const
 Returns the x-coordinate.
const double & y () const
 Returns the y-coordinate.
const double & z () const
 Returns the z-coordinate.
const int & id () const
 Returns the id (TTL_USE_NODE_ID must be defined).
void setFlag (bool flag)
 Sets the flag (TTL_USE_NODE_FLAG must be defined).
const bool & getFlag () const
 Returns the flag (TTL_USE_NODE_FLAG must be defined).

Private Attributes

double x_
double y_
double z_
int id_
 A unique id for each node (TTL_USE_NODE_ID must be defined).
bool flag_
 TTL_USE_NODE_FLAG must be defined.

Static Private Attributes

static int id_count
 TTL_USE_NODE_ID must be defined.

Detailed Description

Node class for data structures (Inherits from HandleId)

Note:
  • To enable node IDs, TTL_USE_NODE_ID must be defined.
  • To enable node flags, TTL_USE_NODE_FLAG must be defined.
  • TTL_USE_NODE_ID and TTL_USE_NODE_FLAG should only be enabled if this functionality is required by the application, because they increase the memory usage for each Node object.

Definition at line 66 of file HeTriang.h.


Constructor & Destructor Documentation

hed::Node::Node (  )  [inline]

Default constructor.

Definition at line 87 of file HeTriang.h.

References init().

00087 { init(0, 0, 0); }

hed::Node::Node ( double  x,
double  y,
double  z = 0.0 
) [inline]

Constructor.

Definition at line 90 of file HeTriang.h.

References init(), and z().

00090 { init(x, y, z); }

hed::Node::~Node (  )  [inline]

Destructor.

Definition at line 93 of file HeTriang.h.

00093 {}


Member Function Documentation

const bool& hed::Node::getFlag (  )  const [inline]

Returns the flag (TTL_USE_NODE_FLAG must be defined).

Definition at line 124 of file HeTriang.h.

References flag_.

00124 { return flag_; }

const int& hed::Node::id (  )  const [inline]

Returns the id (TTL_USE_NODE_ID must be defined).

Definition at line 116 of file HeTriang.h.

00116 { return id_; }

void hed::Node::init ( double  x,
double  y,
double  z 
) [inline]

Initialize the position.

Definition at line 96 of file HeTriang.h.

References id_, id_count, x_, y_, and z_.

Referenced by Node().

00096                                             { 
00097 
00098 #ifdef TTL_USE_NODE_ID
00099       id_ = id_count++;
00100 #endif
00101 
00102       x_ = x; y_ = y; z_ = z; 
00103     }

void hed::Node::setFlag ( bool  flag  )  [inline]

Sets the flag (TTL_USE_NODE_FLAG must be defined).

Definition at line 121 of file HeTriang.h.

00121 { flag_ = flag; }

const double& hed::Node::x (  )  const [inline]

Returns the x-coordinate.

Definition at line 106 of file HeTriang.h.

References x_.

Referenced by hed::TTLtraits::crossProduct2d(), hed::TTLtraits::orient2d(), hed::TTLtraits::scalarProduct2d(), and hed::Dart::x().

00106 { return x_; }

const double& hed::Node::y (  )  const [inline]

Returns the y-coordinate.

Definition at line 109 of file HeTriang.h.

References y_.

Referenced by hed::TTLtraits::crossProduct2d(), hed::TTLtraits::orient2d(), hed::TTLtraits::scalarProduct2d(), and hed::Dart::y().

00109 { return y_; }

const double& hed::Node::z (  )  const [inline]

Returns the z-coordinate.

Definition at line 112 of file HeTriang.h.

References z_.

Referenced by Node().

00112 { return z_; }


Member Data Documentation

bool hed::Node::flag_ [private]

TTL_USE_NODE_FLAG must be defined.

Definition at line 82 of file HeTriang.h.

Referenced by getFlag().

int hed::Node::id_ [private]

A unique id for each node (TTL_USE_NODE_ID must be defined).

Definition at line 77 of file HeTriang.h.

Referenced by init().

int hed::Node::id_count [static, private]

TTL_USE_NODE_ID must be defined.

Definition at line 70 of file HeTriang.h.

Referenced by init().

double hed::Node::x_ [private]

Definition at line 73 of file HeTriang.h.

Referenced by init(), and x().

double hed::Node::y_ [private]

Definition at line 73 of file HeTriang.h.

Referenced by init(), and y().

double hed::Node::z_ [private]

Definition at line 73 of file HeTriang.h.

Referenced by init(), and z().


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

Generated on Wed Nov 17 17:44:28 2010 for TTL by  doxygen 1.6.1