Atoms Crowd  4.1.0
MeshHeightField.h
1 // ===========================================================================
2 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
3 //
4 // Use of this software is subject to the terms of the Toolchefs license
5 // agreement provided at the time of installation or download, or which
6 // otherwise accompanies this software in either electronic or hard copy form.
7 // ===========================================================================
8 #pragma once
9 #include <Atoms/HeightField.h>
10 #include <AtomsUtils/Mesh.h>
11 
12 namespace Atoms
13 {
15  class ATOMS_EXPORT MeshHeightField: public HeightField
16  {
17  public:
18 
19  static size_t staticTypeId();
20 
22 
23  MeshHeightField(const AtomsUtils::Mesh& mesh);
24 
25  virtual ~MeshHeightField();
26 
27  virtual bool intersect(
28  const AtomsCore::Vector3f &orig,
29  const AtomsCore::Vector3f &dir,
30  HitResult& result,
31  bool bothDirection = false
32  ) const;
33 
34  virtual bool closestPoint(
35  const AtomsCore::Vector3f& orig,
36  HitResult& result
37  ) const;
38 
39  virtual void buildIntersectionGrid(short gridMode);
40 
41  const AtomsUtils::Mesh& mesh() const;
42 
43  AtomsUtils::Mesh& mesh();
44 
45  size_t typeId() const;
46 
47  private:
48 
49  AtomsUtils::Mesh m_mesh;
50 
51  };
52 }
Atoms::HeightField::HitResult
Definition: HeightField.h:28
Atoms::MeshHeightField
Container for all agent types.
Definition: MeshHeightField.h:16
Atoms
Atoms namespace.
Definition: Agent.h:28
Atoms::HeightField
Container for all agent types.
Definition: HeightField.h:17
AtomsCore::Vector3f
AtomsMath::Vector3f Vector3f
Vector3 class.
Definition: AtomsMath.h:58
AtomsUtils::Mesh
Mesh class.
Definition: Mesh.h:30