Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

BinaryOp Class Reference

#include <BinaryOp.h>

Inheritance diagram for BinaryOp:

Inheritance graph
[legend]
Collaboration diagram for BinaryOp:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 BinaryOp ()
 Default constructor.

 BinaryOp (Implicit *f, Implicit *g)
 Explicit constructor.

virtual int qlen ()
 qlen Automatically returns total qlen of children.

virtual void _setq (double *q)
 setq Automatically sets q of children.

virtual void getq (double *q)
 getq Automatically gets q of children.

virtual void procq (gmVector3 x, double *q)
 procq Automatically computes df/dq of children.

virtual void getqname (char **qn)
 Automatically fills qn with operands parameter names.

virtual bool setChild (int index, Implicit *child)
 Sets one of the operands of this operation.

virtual ImplicitgetChild (int index)
 Gets one of the operands of this operation.

virtual int maxChildren ()
 Max number of children that can be defined.

virtual int numChildren ()
 Number of children currently defined.


Public Attributes

Implicitm_f
 First operand.

Implicitm_g
 Second operand.


Constructor & Destructor Documentation

BinaryOp::BinaryOp  ) 
 

Default constructor.

Definition at line 11 of file BinaryOp.cpp.

References m_f, and m_g.

BinaryOp::BinaryOp Implicit f,
Implicit g
 

Explicit constructor.

Parameters:
f First operand.
g Second operand.

Definition at line 23 of file BinaryOp.cpp.

References m_f, and m_g.


Member Function Documentation

void BinaryOp::_setq double *  q  )  [virtual]
 

setq Automatically sets q of children.

Does not need to be overridden if op has no parameters. Can be called from subclasses to handle children.

Reimplemented from Implicit.

Reimplemented in Blend, and Subtraction.

Definition at line 46 of file BinaryOp.cpp.

References Implicit::_setq(), m_f, m_g, and Implicit::qlen().

Implicit * BinaryOp::getChild int  index  )  [virtual]
 

Gets one of the operands of this operation.

Parameters:
index the operand to get (either 0, or 1)
Returns:
child[index].

Reimplemented from Implicit.

Definition at line 103 of file BinaryOp.cpp.

References m_f, and m_g.

void BinaryOp::getq double *  q  )  [virtual]
 

getq Automatically gets q of children.

Does not need to be overridden if op has no parameters. Can be called from subclasses to handle children.

Reimplemented from Implicit.

Reimplemented in Blend, and Subtraction.

Definition at line 57 of file BinaryOp.cpp.

References Implicit::getq(), m_f, m_g, and Implicit::qlen().

void BinaryOp::getqname char **  qn  )  [virtual]
 

Automatically fills qn with operands parameter names.

BinaryOp's with no parameters need not redefine getqname(). BinaryOp's with parameters should set the names of only their parameters and then call BinaryOp::getqname(qn) to let it set its operands' parameters.

Reimplemented from Implicit.

Reimplemented in Blend, and Subtraction.

Definition at line 131 of file BinaryOp.cpp.

References Surface::getObjectName(), Implicit::getqname(), m_f, m_g, Surface::name(), qlen(), and Implicit::qlen().

virtual int BinaryOp::maxChildren  )  [inline, virtual]
 

Max number of children that can be defined.

This will return -1 for operators that can have an arbitrary number of operands.

Reimplemented from Implicit.

Definition at line 32 of file BinaryOp.h.

int BinaryOp::numChildren  )  [virtual]
 

Number of children currently defined.

Reimplemented from Implicit.

Definition at line 113 of file BinaryOp.cpp.

References m_f, and m_g.

void BinaryOp::procq gmVector3  x,
double *  q
[virtual]
 

procq Automatically computes df/dq of children.

Does not need to be overridden if op has no parameters. Can be called from subclasses to handle children.

Reimplemented from Implicit.

Reimplemented in Blend, and Subtraction.

Definition at line 68 of file BinaryOp.cpp.

References m_f, m_g, Implicit::procq(), and Implicit::qlen().

int BinaryOp::qlen void   )  [virtual]
 

qlen Automatically returns total qlen of children.

Does not need to be overridden if op has no parameters. Can be called from subclasses to handle children.

Reimplemented from Implicit.

Reimplemented in Blend, and Subtraction.

Definition at line 35 of file BinaryOp.cpp.

References m_f, m_g, and Implicit::qlen().

Referenced by getqname().

bool BinaryOp::setChild int  index,
Implicit child
[virtual]
 

Sets one of the operands of this operation.

Parameters:
index the operand to set (either 0, or 1)
child What to set the operand to.
Returns:
False if there are not exactly 2 children in the vector.

Reimplemented from Implicit.

Definition at line 80 of file BinaryOp.cpp.

References m_f, and m_g.


Member Data Documentation

Implicit* BinaryOp::m_f
 

First operand.

Reimplemented in ASubtraction, and Subtraction.

Definition at line 17 of file BinaryOp.h.

Referenced by Blend::_setq(), _setq(), AIntersection::AIntersection(), AUnion::AUnion(), BinaryOp(), Difference::Difference(), getChild(), Blend::getq(), getq(), Blend::getqname(), getqname(), Sum::grad(), Difference::grad(), Blend::grad(), Sum::hess(), Difference::hess(), Blend::hess(), Intersection::init(), Blend::init(), numChildren(), Sum::proc(), Difference::proc(), Blend::proc(), Blend::procq(), procq(), Blend::qlen(), qlen(), setChild(), Sum::Sum(), and Union::Union().

Implicit* BinaryOp::m_g
 

Second operand.

Definition at line 18 of file BinaryOp.h.

Referenced by Blend::_setq(), _setq(), AIntersection::AIntersection(), AUnion::AUnion(), BinaryOp(), Difference::Difference(), getChild(), Blend::getq(), getq(), Blend::getqname(), getqname(), Sum::grad(), Difference::grad(), Blend::grad(), Sum::hess(), Difference::hess(), Blend::hess(), Intersection::init(), Blend::init(), numChildren(), Sum::proc(), Difference::proc(), Blend::proc(), Blend::procq(), procq(), Blend::qlen(), qlen(), setChild(), Sum::Sum(), and Union::Union().


The documentation for this class was generated from the following files:
Generated on Mon Jun 28 15:02:02 2004 for Advanced Surface Library by doxygen 1.3.4