GenGeo  1.1
Shape Class Reference

#include <Shape.h>

Inheritance diagram for Shape:

Public Member Functions

 Shape ()
void makeOrientationRandom (int i)
int useRandomOrientation ()
void setRandomOrientation ()
void setRandomPitch ()
void setRandomYaw ()
void setRandomRoll ()
Vector3 rotatePoint (Vector3 point)
virtual void insert (Vector3 pos, double radius, MNTable3D *ntable, int tag, int id)
int bias ()
void setBias (int)
void setPitch (double)
double getPitch ()
void setYaw (double)
double getYaw ()
void setRoll (double)
double getRoll ()
void setBondTag (int)
int getBondTag ()
void setParticleTag (int)
int getParticleTag ()
 ~Shape ()

Protected Attributes

double pitch
double yaw
double roll
int bias_factor
int randomOrientation
int bondTag
int particleTag

Constructor & Destructor Documentation

Shape::Shape ( )

References pitch, randomOrientation, roll, and yaw.

Shape::~Shape ( )

Member Function Documentation

int Shape::bias ( )

Show the bias of a given shape (ie how likely it is to occur. Note that the function must return a deterministic value.

Reimplemented in GenericShape, SphereObj, and HexAggregateShape.

References bias_factor.

int Shape::getBondTag ( )

References bondTag.

Referenced by GenericShape::insert().

int Shape::getParticleTag ( )

References particleTag.

Referenced by GenericShape::insert().

double Shape::getPitch ( )

References pitch.

double Shape::getRoll ( )

References roll.

double Shape::getYaw ( )

References yaw.

virtual void Shape::insert ( Vector3  pos,
double  radius,
MNTable3D ntable,
int  tag,
int  id 
)
inlinevirtual

Reimplemented in GenericShape, SphereObj, and HexAggregateShape.

void Shape::makeOrientationRandom ( int  i)

Tell the shape to be randomly orientated. This will make every object have a random orientation

Parameters
i1 for using random orientation, 0 to disable

References randomOrientation.

Referenced by ShapeList::addGenericShape(), ShapeList::addHexShape(), and exportShape().

Vector3 Shape::rotatePoint ( Vector3  point)

Rotate a point around the x, y and z axies. Rotation values are given using setRoll functions etc.

Parameters
pointthe point to rotate
Returns
the rotated point

References pitch, roll, Vector3::rotate(), and yaw.

Referenced by HexAggregateShape::insert(), SphereObj::insert(), and GenericShape::insert().

Here is the call graph for this function:

void Shape::setBias ( int  i)

Set the bias of the given shape

Parameters
biasthe bias of the shape

Reimplemented in GenericShape, HexAggregateShape, and SphereObj.

References bias_factor.

Referenced by ShapeList::addGenericShape().

void Shape::setBondTag ( int  tag)

References bondTag.

Referenced by ShapeList::addGenericShape().

void Shape::setParticleTag ( int  tag)

References particleTag.

Referenced by ShapeList::addGenericShape().

void Shape::setPitch ( double  pitch)

References pitch.

void Shape::setRandomOrientation ( )

Sets a random orientation. Note that this will be run before every insert if the appropriate function is called.

References setRandomPitch(), setRandomRoll(), and setRandomYaw().

Referenced by HexAggregateShape::insert(), SphereObj::insert(), and GenericShape::insert().

Here is the call graph for this function:

void Shape::setRandomPitch ( )

Set a random pitch to the object

References pitch.

Referenced by setRandomOrientation().

void Shape::setRandomRoll ( )

Set a random roll to the object

References roll.

Referenced by setRandomOrientation().

void Shape::setRandomYaw ( )

Set a random yaw to the object

References yaw.

Referenced by setRandomOrientation().

void Shape::setRoll ( double  roll)

References roll.

void Shape::setYaw ( double  yaw)

References yaw.

int Shape::useRandomOrientation ( )

Returns 1 if the shape is to be randomly orientated

Returns
1 if shape is to be randomly orientated

References randomOrientation.

Referenced by HexAggregateShape::insert(), SphereObj::insert(), and GenericShape::insert().

Member Data Documentation

int Shape::bias_factor
protected

Referenced by bias(), and setBias().

int Shape::bondTag
protected

Referenced by getBondTag(), and setBondTag().

int Shape::particleTag
protected

Referenced by getParticleTag(), and setParticleTag().

double Shape::pitch
protected
int Shape::randomOrientation
protected
double Shape::roll
protected
double Shape::yaw
protected

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