# cee::ug::ParticleTraceGroup

class `ParticleTraceGroup` : public RefCountedObject

  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().

  Public Types

  enum `VisualizationStyle`

    Visualization style for a particle trace.

    Values:

    enumerator `CYLINDERS`

      Draw the particle trace lines as 3D cylinders.

    enumerator `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)

    enumerator `RIBBONS`

      Draw the particle trace lines as ribbons.

    enumerator `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)

    enumerator `LINES`

      Draw particle traces as lines.

    enumerator `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)

  enum `ScaleMode`

    Scaling mode for particle traces.

    Values:

    enumerator `ABSOLUTE_SCALING`

      Absolute scaling of vectors.

    enumerator `RELATIVE_SCALING`

      Scales vectors relative to model extent.

  Public Functions

  `ParticleTraceGroup`()

    Constructs an empty particle trace group.

  std::vector<Vec3d> `seedPoints`() const

    Returns an array of the current seed points.

  void `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.

  bool `visible`() const

    Returns true if this group is visible.

  void `setVisible`(bool visible)

    Sets visibility for this group.

  int `vectorResultId`() const

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

  void `setVectorResultId`(int resultId)

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

  int `mapScalarResultId`() const

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

    Returns -1 if none.

  void `setMapScalarResultId`(int resultId)

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

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

  bool `computeForward`() const

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

  void `setComputeForward`(bool compute)

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

  bool `computeBackward`() const

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

  void `setComputeBackward`(bool compute)

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

  int `maximumNumberOfPointsToCompute`() const

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

  void `setMaximumNumberOfPointsToCompute`(int maxNumPoints)

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

  double `extrapolateRatioLength`() const

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

  void `setExtrapolateRatioLength`(double extrapolateRatioLength)

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

  VisualizationStyle `visualizationStyle`() const

    Returns the visualization style.

  void `setVisualizationStyle`(VisualizationStyle style)

    Sets the visualization style.

  Color3f `color`() const

    Returns the base color of the primitives.

  void `setColor`(const Color3f &color)

    Sets the primitive color.

  ScaleMode `scaleMode`() const

    Returns the scale mode for these particle traces.

  double `scaleFactor`() const

    Returns the current scale factor.

  void `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.

  double `pointSamplingNumberOfPulses`() const

    Returns the number of sampling pulses.

  void `setPointSamplingNumberOfPulses`(double numPulses)

    Sets the number of sampling pulses.

  double `cometLength`() const

    Returns the length of the comet primitive.

  void `setCometLength`(double length)

    Sets the length of the comet primitive.

  double `arrowLength`() const

    Returns the length of the arrow primitive.

  void `setArrowLength`(double length)

    Sets the length of the arrow primitive.

  double `ribbonRelativeWidth`() const

    Returns the width of the ribbon primitive.

  void `setRibbonRelativeWidth`(double relativeSize)

    Sets the width of the ribbon primitive.

  double `ribbonRelativeThickness`() const

    Returns the thickness of the ribbon primitive.

  void `setRibbonRelativeThickness`(double relativeSize)

    Sets the thickness of the ribbon primitive.

  double `minimumTraceTime`(size_t frameIndex) const

    Returns minimum trace time.

  double `maximumTraceTime`(size_t frameIndex) const

    Returns maximum trace time.

  bool `ignoreClipping`() const

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

  void `setIgnoreClipping`(bool ignore)

    Sets if the trace will ignore clipping.

  bool `isPrecomputed`() const

    Returns true if the particle trace group is precomputed.

    Precomputed particle traces cannot be altered or moved.

  void `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 `traceData`(size_t frameIndex, std::vector<ParticleTraceData> *groupDataArr) const

    Gets the particle trace data for the given frame.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...