![]()  | 
  
    ProtoTracer
    1.0
    
   Real-time 3D rendering and animation engine 
   | 
 
Provides deformation effects for groups of triangles. More...
#include <TriangleGroupDeformer.h>

Public Types | |
| enum | Axis { XAxis , YAxis , ZAxis } | 
| Defines the axes available for deformations and clipping.  More... | |
Private Member Functions | |
| bool | CheckClipAxis (Vector3D base, bool positive, Axis valueCheckAxis) | 
| Checks if a given base position is clipped along a specific axis.   | |
Private Attributes | |
| ITriangleGroup ** | objects | 
| Array of triangle group objects to deform.   | |
| int | objectCount = 0 | 
| Number of triangle group objects.   | |
Provides deformation effects for groups of triangles.
This class supports applying various deformations to groups of triangles such as sinusoidal, dropwave, and cosine interpolation. It also supports axis-aligned clipping and custom deformations along selected axes.
Definition at line 25 of file TriangleGroupDeformer.h.
Defines the axes available for deformations and clipping.
| Enumerator | |
|---|---|
| XAxis | X-axis.  | 
| YAxis | Y-axis.  | 
| ZAxis | Z-axis.  | 
Definition at line 31 of file TriangleGroupDeformer.h.
| TriangleGroupDeformer | ( | ITriangleGroup * | object | ) | 
Constructor for a single triangle group.
| object | A single triangle group object to deform. | 
Definition at line 3 of file TriangleGroupDeformer.cpp.
References objectCount, and objects.
| TriangleGroupDeformer | ( | ITriangleGroup ** | objects, | 
| int | objectCount | ||
| ) | 
Constructor for multiple triangle groups.
| objects | Array of triangle group objects to deform. | 
| objectCount | Number of triangle group objects. | 
Definition at line 11 of file TriangleGroupDeformer.cpp.
References objectCount, and objects.
Applies axis-aligned clipping to the triangles.
| positive | Whether to clip along the positive side of the axis. | 
| clipAxis | Axis to apply the clipping. | 
| valueCheckAxis | Axis used to determine clipping. | 
Definition at line 156 of file TriangleGroupDeformer.cpp.
References CheckClipAxis(), ITriangleGroup::GetVertexCount(), ITriangleGroup::GetVertices(), objectCount, objects, Vector3D::X, XAxis, Vector3D::Y, YAxis, Vector3D::Z, and ZAxis.
Checks if a given base position is clipped along a specific axis.
| base | The base position to check. | 
| positive | Whether to check the positive side of the axis. | 
| valueCheckAxis | The axis to check against. | 
Definition at line 16 of file TriangleGroupDeformer.cpp.
References Vector3D::X, XAxis, Vector3D::Y, YAxis, Vector3D::Z, and ZAxis.
Referenced by AxisZeroClipping().
| void CosineInterpolationDeformer | ( | float * | pointMultiplier, | 
| int | points, | ||
| float | scale, | ||
| float | minAxis, | ||
| float | maxAxis, | ||
| Axis | selectionAxis, | ||
| Axis | deformAxis | ||
| ) | 
Applies a cosine interpolation deformation along a specified axis.
| pointMultiplier | Array of multipliers for points during deformation. | 
| points | Number of points to deform. | 
| scale | Scale of the deformation. | 
| minAxis | Minimum axis value for deformation. | 
| maxAxis | Maximum axis value for deformation. | 
| selectionAxis | Axis used for selecting points. | 
| deformAxis | Axis along which the deformation is applied. | 
Definition at line 100 of file TriangleGroupDeformer.cpp.
References Mathematics::CosineInterpolation(), ITriangleGroup::GetVertexCount(), ITriangleGroup::GetVertices(), objectCount, objects, Mathematics::RoundUpWindow(), Vector3D::X, XAxis, Vector3D::Y, YAxis, Vector3D::Z, and ZAxis.
| void DropwaveDeform | ( | float | magnitude, | 
| float | timeRatio, | ||
| float | periodModifier, | ||
| float | frequencyModifier, | ||
| Axis | axis | ||
| ) | 
Applies a dropwave deformation along a specified axis.
| magnitude | Magnitude of the deformation. | 
| timeRatio | Time progression ratio for the deformation. | 
| periodModifier | Modifier for the deformation period. | 
| frequencyModifier | Modifier for the deformation frequency. | 
| axis | The axis along which to apply the deformation. | 
Definition at line 56 of file TriangleGroupDeformer.cpp.
References ITriangleGroup::GetVertexCount(), ITriangleGroup::GetVertices(), objectCount, objects, Vector3D::X, XAxis, Vector3D::Y, YAxis, Vector3D::Z, and ZAxis.
| void SineWaveSurfaceDeform | ( | Vector3D | offset, | 
| float | magnitude, | ||
| float | timeRatio, | ||
| float | periodModifier, | ||
| float | frequencyModifier, | ||
| Axis | axis | ||
| ) | 
Applies a sine wave surface deformation along a specified axis.
| offset | Offset for the sine wave deformation. | 
| magnitude | Magnitude of the deformation. | 
| timeRatio | Time progression ratio for the deformation. | 
| periodModifier | Modifier for the deformation period. | 
| frequencyModifier | Modifier for the deformation frequency. | 
| axis | The axis along which to apply the deformation. | 
Definition at line 78 of file TriangleGroupDeformer.cpp.
References ITriangleGroup::GetVertexCount(), ITriangleGroup::GetVertices(), objectCount, objects, Vector3D::X, XAxis, Vector3D::Y, YAxis, Vector3D::Z, and ZAxis.
| void SinusoidalDeform | ( | float | magnitude, | 
| float | timeRatio, | ||
| float | periodModifier, | ||
| float | frequencyModifier, | ||
| Axis | axis | ||
| ) | 
Applies a sinusoidal deformation along a specified axis.
| magnitude | Magnitude of the deformation. | 
| timeRatio | Time progression ratio for the deformation. | 
| periodModifier | Modifier for the deformation period. | 
| frequencyModifier | Modifier for the deformation frequency. | 
| axis | The axis along which to apply the deformation. | 
Definition at line 34 of file TriangleGroupDeformer.cpp.
References ITriangleGroup::GetVertexCount(), ITriangleGroup::GetVertices(), objectCount, objects, Vector3D::X, XAxis, Vector3D::Y, YAxis, Vector3D::Z, and ZAxis.
      
  | 
  private | 
Number of triangle group objects.
Definition at line 39 of file TriangleGroupDeformer.h.
Referenced by AxisZeroClipping(), CosineInterpolationDeformer(), DropwaveDeform(), SineWaveSurfaceDeform(), SinusoidalDeform(), TriangleGroupDeformer(), and TriangleGroupDeformer().
      
  | 
  private | 
Array of triangle group objects to deform.
Definition at line 38 of file TriangleGroupDeformer.h.
Referenced by AxisZeroClipping(), CosineInterpolationDeformer(), DropwaveDeform(), SineWaveSurfaceDeform(), SinusoidalDeform(), TriangleGroupDeformer(), and TriangleGroupDeformer().