cee::ug::ParticleTraceGroup Class Reference

Configuration of a group of particle trace objects. More...

Public Types

enum  VisualizationStyle {
  CYLINDERS, SPHERES, RIBBONS, COMETS,
  LINES, ARROWS
}
 Visualization style for a particle trace. More...
 
enum  ScaleMode { ABSOLUTE_SCALING, RELATIVE_SCALING }
 Scaling mode for particle traces. More...
 

Public Member Functions

 ParticleTraceGroup ()
 Constructs an empty particle trace group. More...
 
std::vector< Vec3dseedPoints () const
 Returns an array of the current seed points. More...
 
void setSeedPoints (const std::vector< Vec3d > &seedPoints)
 Sets the seed points to use for particle tracing. More...
 
bool visible () const
 Returns true if this group is visible. More...
 
void setVisible (bool visible)
 Sets visibility for this group. More...
 
int vectorResultId () const
 Returns the id of the current vector result used to calculate particle trajectories. More...
 
void setVectorResultId (int resultId)
 Sets the id of the vector result used to calculate the particle trajectories. More...
 
int mapScalarResultId () const
 Returns the id of the scalar result mapped on the primitives. More...
 
void setMapScalarResultId (int resultId)
 Sets the id of the scalar result mapped on the primitives. More...
 
bool computeForward () const
 Returns true if the particle trace will be computed forward from the seed points. More...
 
void setComputeForward (bool compute)
 Sets if the particle trace will be computed forward from the seed points. More...
 
bool computeBackward () const
 Returns true if the particle trace will be computed backward from the seed points. More...
 
void setComputeBackward (bool compute)
 Sets if the particle trace will be computed backward from the seed points. More...
 
int maximumNumberOfPointsToCompute () const
 Returns the maximum number of points to compute for this group. More...
 
void setMaximumNumberOfPointsToCompute (int maxNumPoints)
 Sets the maximum number of points to compute for this group. More...
 
double extrapolateRatioLength () const
 Sets the ratio length relative to the frame bounding box to test when moving out of the part. More...
 
void setExtrapolateRatioLength (double extrapolateRatioLength)
 Returns the ratio length relative to the frame bounding box to test when moving out of the part. More...
 
VisualizationStyle visualizationStyle () const
 Returns the visualization style. More...
 
void setVisualizationStyle (VisualizationStyle style)
 Sets the visualization style. More...
 
Color3f color () const
 Returns the base color of the primitives. More...
 
void setColor (const Color3f &color)
 Sets the primitive color. More...
 
ScaleMode scaleMode () const
 Returns the scale mode for these particle traces. More...
 
double scaleFactor () const
 Returns the current scale factor. More...
 
void set3DPrimitiveRadius (ScaleMode mode, double scaleFactor)
 Sets the 3D primitive radius. More...
 
double pointSamplingNumberOfPulses () const
 Returns the number of sampling pulses. More...
 
void setPointSamplingNumberOfPulses (double numPulses)
 Sets the number of sampling pulses. More...
 
double cometLength () const
 Returns the length of the comet primitive. More...
 
void setCometLength (double length)
 Sets the length of the comet primitive. More...
 
double arrowLength () const
 Returns the length of the arrow primitive. More...
 
void setArrowLength (double length)
 Sets the length of the arrow primitive. More...
 
double ribbonRelativeWidth () const
 Returns the width of the ribbon primitive. More...
 
void setRibbonRelativeWidth (double relativeSize)
 Sets the width of the ribbon primitive. More...
 
double ribbonRelativeThickness () const
 Returns the thickness of the ribbon primitive. More...
 
void setRibbonRelativeThickness (double relativeSize)
 Sets the thickness of the ribbon primitive. More...
 
double minimumTraceTime (size_t frameIndex) const
 Returns minimum trace time. More...
 
double maximumTraceTime (size_t frameIndex) const
 Returns maximum trace time. More...
 
bool ignoreClipping () const
 Returns true if the trace will ignore clipping, false if the trace will be clipped. More...
 
void setIgnoreClipping (bool ignore)
 Sets if the trace will ignore clipping. More...
 
bool isPrecomputed () const
 Returns true if the particle trace group is precomputed. More...
 
void setTraceData (size_t frameIndex, const std::vector< ParticleTraceData > &groupDataArr)
 Sets the particle trace data for the given frame. More...
 
void traceData (size_t frameIndex, std::vector< ParticleTraceData > *groupDataArr) const
 Gets the particle trace data for the given frame. More...
 
- Public Member Functions inherited from cee::RefCountedObject
void addRef () const
 Increments the reference count for this object. More...
 
void release () const
 Decrements the reference count for this object. More...
 
int refCount () const
 Returns the reference count for this object. More...
 
void setRefCountZero () const
 Sets the ref count to zero, but DOES NOT delete the object. More...
 
Inheritance diagram for cee::ug::ParticleTraceGroup:
cee::RefCountedObject

Detailed Description

Configuration of a group of particle trace objects.

To visualize features of a vector field, it is possible to define streamlines; the paths of mass less particles through the flow. Streamlines can be computed based on specification of single points. Animated display of movement along the streamlines is a powerful and direct way to show the features of the flow.

Particle traces is defined by a vector result defining the vector field and an array of trace seed points. The particles traces uses 3D primitives such as cylinders, spheres, lines, ribbons or comets. A scalar result can be mapped as fringes onto these primitives.

The particle trace can be animated. Control the animation using UnstructGridModel::setParticleTraceTime().

A ParticleTraceGroup is featured on a model through UnstructGridModel::addParticleTraceGroup().

Member Enumeration Documentation

Scaling mode for particle traces.

Enumerator
ABSOLUTE_SCALING 

Absolute scaling of vectors.

RELATIVE_SCALING 

Scales vectors relative to model extent.

Visualization style for a particle trace.

Enumerator
CYLINDERS 

Draw the particle trace lines as 3D cylinders.

SPHERES 

Draw the particle trace points as spheres. Spheres also have a pulse count for starting particles at regular intervals. Spheres requires shader support (OpenGL 2.0)

RIBBONS 

Draw the particle trace lines as ribbons.

COMETS 

Draw the particle trace points as comets. Comets also have a pulse count for starting particles at regular intervals. Comets requires shader support (OpenGL 2.0)

LINES 

Draw particle traces as lines.

ARROWS 

Draw the particle trace points as arrows. Arrows also have a pulse count for starting particles at regular intervals. Arrows requires shader support (OpenGL 2.0)

Constructor & Destructor Documentation

cee::ug::ParticleTraceGroup::ParticleTraceGroup ( )

Constructs an empty particle trace group.

Member Function Documentation

double cee::ug::ParticleTraceGroup::arrowLength ( ) const

Returns the length of the arrow primitive.

Color3f cee::ug::ParticleTraceGroup::color ( ) const

Returns the base color of the primitives.

double cee::ug::ParticleTraceGroup::cometLength ( ) const

Returns the length of the comet primitive.

bool cee::ug::ParticleTraceGroup::computeBackward ( ) const

Returns true if the particle trace will be computed backward from the seed points.

bool cee::ug::ParticleTraceGroup::computeForward ( ) const

Returns true if the particle trace will be computed forward from the seed points.

double cee::ug::ParticleTraceGroup::extrapolateRatioLength ( ) const

Sets the ratio length relative to the frame bounding box to test when moving out of the part.

bool cee::ug::ParticleTraceGroup::ignoreClipping ( ) const

Returns true if the trace will ignore clipping, false if the trace will be clipped.

bool cee::ug::ParticleTraceGroup::isPrecomputed ( ) const

Returns true if the particle trace group is precomputed.

Precomputed particle traces cannot be altered or moved.

int cee::ug::ParticleTraceGroup::mapScalarResultId ( ) const

Returns the id of the scalar result mapped on the primitives.

Returns -1 if none.

int cee::ug::ParticleTraceGroup::maximumNumberOfPointsToCompute ( ) const

Returns the maximum number of points to compute for this group.

double cee::ug::ParticleTraceGroup::maximumTraceTime ( size_t  frameIndex) const

Returns maximum trace time.

double cee::ug::ParticleTraceGroup::minimumTraceTime ( size_t  frameIndex) const

Returns minimum trace time.

double cee::ug::ParticleTraceGroup::pointSamplingNumberOfPulses ( ) const

Returns the number of sampling pulses.

double cee::ug::ParticleTraceGroup::ribbonRelativeThickness ( ) const

Returns the thickness of the ribbon primitive.

double cee::ug::ParticleTraceGroup::ribbonRelativeWidth ( ) const

Returns the width of the ribbon primitive.

double cee::ug::ParticleTraceGroup::scaleFactor ( ) const

Returns the current scale factor.

ParticleTraceGroup::ScaleMode cee::ug::ParticleTraceGroup::scaleMode ( ) const

Returns the scale mode for these particle traces.

std::vector< Vec3d > cee::ug::ParticleTraceGroup::seedPoints ( ) const

Returns an array of the current seed points.

void cee::ug::ParticleTraceGroup::set3DPrimitiveRadius ( ScaleMode  mode,
double  scaleFactor 
)

Sets the 3D primitive radius.

If relative scaling is used, a factor of 1 (default) will give a size of 0.006 times the largest extent of the model's bounding box.

void cee::ug::ParticleTraceGroup::setArrowLength ( double  length)

Sets the length of the arrow primitive.

void cee::ug::ParticleTraceGroup::setColor ( const Color3f color)

Sets the primitive color.

void cee::ug::ParticleTraceGroup::setCometLength ( double  length)

Sets the length of the comet primitive.

void cee::ug::ParticleTraceGroup::setComputeBackward ( bool  compute)

Sets if the particle trace will be computed backward from the seed points.

void cee::ug::ParticleTraceGroup::setComputeForward ( bool  compute)

Sets if the particle trace will be computed forward from the seed points.

void cee::ug::ParticleTraceGroup::setExtrapolateRatioLength ( double  extrapolateRatioLength)

Returns the ratio length relative to the frame bounding box to test when moving out of the part.

void cee::ug::ParticleTraceGroup::setIgnoreClipping ( bool  ignore)

Sets if the trace will ignore clipping.

void cee::ug::ParticleTraceGroup::setMapScalarResultId ( int  resultId)

Sets the id of the scalar result mapped on the primitives.

Set resultId to -1 to clear the mapped scalar result.

void cee::ug::ParticleTraceGroup::setMaximumNumberOfPointsToCompute ( int  maxNumPoints)

Sets the maximum number of points to compute for this group.

void cee::ug::ParticleTraceGroup::setPointSamplingNumberOfPulses ( double  numPulses)

Sets the number of sampling pulses.

void cee::ug::ParticleTraceGroup::setRibbonRelativeThickness ( double  relativeSize)

Sets the thickness of the ribbon primitive.

void cee::ug::ParticleTraceGroup::setRibbonRelativeWidth ( double  relativeSize)

Sets the width of the ribbon primitive.

void cee::ug::ParticleTraceGroup::setSeedPoints ( const std::vector< Vec3d > &  seedPoints)

Sets the seed points to use for particle tracing.

There will be one trace computed from each seed point.

void cee::ug::ParticleTraceGroup::setTraceData ( size_t  frameIndex,
const std::vector< ParticleTraceData > &  groupDataArr 
)

Sets the particle trace data for the given frame.

Allow for user defined particle traces in the unstruct grid model.

Pre-requisites for using this method:

  • The particle trace group must already have been added to an unstruct grid model
  • The model must have some content - the given frame index must exist and have some model in it.
  • If using scalars, there must be a scalar in the model for the scalar mapping to work
void cee::ug::ParticleTraceGroup::setVectorResultId ( int  resultId)

Sets the id of the vector result used to calculate the particle trajectories.

void cee::ug::ParticleTraceGroup::setVisible ( bool  visible)

Sets visibility for this group.

void cee::ug::ParticleTraceGroup::setVisualizationStyle ( VisualizationStyle  style)

Sets the visualization style.

void cee::ug::ParticleTraceGroup::traceData ( size_t  frameIndex,
std::vector< ParticleTraceData > *  groupDataArr 
) const

Gets the particle trace data for the given frame.

int cee::ug::ParticleTraceGroup::vectorResultId ( ) const

Returns the id of the current vector result used to calculate particle trajectories.

bool cee::ug::ParticleTraceGroup::visible ( ) const

Returns true if this group is visible.

ParticleTraceGroup::VisualizationStyle cee::ug::ParticleTraceGroup::visualizationStyle ( ) const

Returns the visualization style.