Object Class Reference

#include <Object.hpp>

Collaboration diagram for Object:

Collaboration graph
[legend]

List of all members.

Public Member Functions

const bool & hasReference () const
const TinyVector< 3 > & reference () const
ConstReferenceCounting< Shapeshape () const
bool inside (const TinyVector< 3, real_t > &x) const
void setReference (const TinyVector< 3, real_t > &aReference)
ReferenceCounting< ObjectgetCopy () const
 Object (ConstReferenceCounting< Shape > s)
 Object (const Object &o)
 ~Object ()

Private Attributes

ConstReferenceCounting< Shape__shape
bool __hasReference
TinyVector< 3, real_t > __reference

Friends

std::ostream & operator<< (std::ostream &os, const Object &o)


Detailed Description

Definition at line 37 of file Object.hpp.


Constructor & Destructor Documentation

Object::Object ( ConstReferenceCounting< Shape s  )  [inline]

Constructs an object using a given shape

Parameters:
s the given shape

Definition at line 135 of file Object.hpp.

Referenced by getCopy().

00136     : __shape(s),
00137       __hasReference(false),
00138       __reference(0)
00139   {
00140     ;
00141   }

Object::Object ( const Object o  )  [inline]

Constructs an object using another object

Parameters:
o a given object

Definition at line 148 of file Object.hpp.

00149     : __shape(o.__shape->getCopy()),
00150       __hasReference(o.__hasReference),
00151       __reference(o.__reference)
00152   {
00153     ;
00154   }

Object::~Object (  )  [inline]

Destructor

Definition at line 160 of file Object.hpp.

00161   {
00162     ;
00163   }


Member Function Documentation

const bool& Object::hasReference (  )  const [inline]

returns the reference state of the object

Returns:
true if the object has a defined reference

Definition at line 69 of file Object.hpp.

References __hasReference.

Referenced by Domain::__buildReferenceAssociation(), and ObjectTransformer::operator()().

00070   {
00071     return __hasReference;
00072   }

const TinyVector<3>& Object::reference (  )  const [inline]

Access to the reference of the object

Returns:
the reference

Definition at line 79 of file Object.hpp.

References __hasReference, __reference, and ASSERT.

Referenced by Domain::__buildReferenceAssociation(), and ObjectTransformer::operator()().

00080   {
00081     ASSERT(__hasReference);
00082     return __reference;
00083   }

ConstReferenceCounting<Shape> Object::shape (  )  const [inline]

Read only access to the shape of the object

Returns:
the shape

Definition at line 90 of file Object.hpp.

References __shape, and ASSERT.

Referenced by Domain::__buildReferenceAssociation(), and ObjectTransformer::operator()().

00091   {
00092     ASSERT(__shape != 0);
00093     return __shape;
00094   }

bool Object::inside ( const TinyVector< 3, real_t > &  x  )  const [inline]

Computes if a vertex is inside the object

Parameters:
x the given vertex
Returns:
true if x is in the shape

Definition at line 103 of file Object.hpp.

References __shape.

00104   {
00105     return __shape->inside(x);
00106   }

void Object::setReference ( const TinyVector< 3, real_t > &  aReference  )  [inline]

Sets the reference object

Parameters:
aReference the given reference

Definition at line 113 of file Object.hpp.

References __hasReference, __reference, and ASSERT.

Referenced by InsideListExpressionLeaf::objects(), and ObjectTransformer::operator()().

00114   {
00115     ASSERT(__hasReference == false);
00116     __hasReference = true;
00117     __reference = aReference;
00118   }

ReferenceCounting<Object> Object::getCopy (  )  const [inline]

Gets a copy of the Object

Returns:
deep copy of the Object

Definition at line 125 of file Object.hpp.

References Object().

00126   {
00127     return new Object(*this);
00128   }

Here is the call graph for this function:


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const Object o 
) [friend]

Writes the object information in a given stream

Parameters:
os the given stream
o the object to write
Returns:
the modified stream

Definition at line 57 of file Object.hpp.

00059   {
00060     os << (*o.__shape) << '\n';
00061     return os;
00062   }


Member Data Documentation

the shape

Definition at line 41 of file Object.hpp.

Referenced by inside(), and shape().

bool Object::__hasReference [private]

true if the object has a reference

Definition at line 43 of file Object.hpp.

Referenced by hasReference(), reference(), and setReference().

TinyVector<3,real_t> Object::__reference [private]

the POV-Ray reference of the object

Definition at line 46 of file Object.hpp.

Referenced by reference(), and setReference().


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

Generated on Wed Nov 19 00:10:41 2008 for FreeFEM3D (aka ff3d) by  doxygen 1.5.6