AGX Dynamics  2.35.0.1
DeformerActiveZone.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
19 #include <agx/config/AGX_USE_AGXTERRAIN.h>
20 
21 #include <agxTerrain/ActiveZone.h>
22 
23 
24 namespace agxTerrain
25 {
26 
27  class DeformerCollection;
28 
30 
32  {
33  public:
35 
36  ActiveZone::Type getType() const override;
37 
38  void onPreCollide(Terrain* terrain, const agx::Line& cuttingEdge, const agx::Line& topEdge, const agx::Vec3& forwardVector) override;
39 
40  void onPre(Terrain* terrain, const agx::Line& cuttingEdge, const agx::Line& topEdge, const agx::Vec3& forwardVector) override;
41 
42  void onPost(Terrain* terrain, const agx::Line& cuttingEdge, const agx::Line& topEdge, const agx::Vec3& forwardVector) override;
43 
44  protected:
46 
47  private:
48 
49  void calculateProjectedVectors(Terrain* terrain,
50  const agx::Line& cuttingEdge,
51  const agx::Line& topEdge,
52  const agx::Vec3& forwardVector,
53  agx::Line& cuttingEdgeWorld,
54  agx::Line& topEdgeWorld);
55 
56  private:
57  agx::Vec3 m_projectedForwardVector;
58  agx::Vec3 m_flatForwardVector;
59 
60  DeformerCollection* m_deformer;
61  };
62 }
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
#define AGXTERRAIN_EXPORT
void onPost(Terrain *terrain, const agx::Line &cuttingEdge, const agx::Line &topEdge, const agx::Vec3 &forwardVector) override
DeformerActiveZone(agx::Frame *parentFrame, DeformerCollection *deformer)
ActiveZone::Type getType() const override
void onPreCollide(Terrain *terrain, const agx::Line &cuttingEdge, const agx::Line &topEdge, const agx::Vec3 &forwardVector) override
void onPre(Terrain *terrain, const agx::Line &cuttingEdge, const agx::Line &topEdge, const agx::Vec3 &forwardVector) override
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
The object defining a frame of reference and providing transformations operations.
Definition: agx/Frame.h:68
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
Definition: Geometry.h:60