gwnavruntime/collision/collisiondata.h Source File

collisiondata.h
Go to the documentation of this file.
1 /*
2 * Copyright 2016 Autodesk, Inc. All rights reserved.
3 * Use of this software is subject to the terms of the Autodesk license agreement and any attachments or Appendices thereto provided at the time of installation or download,
4 * or which otherwise accompanies this software in either electronic or hard copy form, or which is signed by you and accepted by Autodesk.
5 */
6 
7 #pragma once
8 
17 
18 namespace Kaim
19 {
20 
21 class FileOpenerBase;
22 class File;
23 class ICollisionInterface;
24 
29 
31 {
33 public:
34  static WorldElementType GetStaticType() { return TypeColData; }
35  virtual WorldElementType GetType() const { return TypeColData; }
36  virtual const char* GetTypeName() const { return "ColData"; }
37 
38  CollisionData() {}
39  ~CollisionData();
40 
41  void Clear();
42 
45  KyResult Load(const char* fileName, FileOpenerBase* fileOpener = nullptr);
46  KyResult LoadFromMemory(void* memory);
47 
48  KyResult Save(const char* fileName, FileOpenerBase* fileOpener = nullptr, Endianness::Type endianness = Endianness::LittleEndian);
49 
50  void AddDescriptorToBlobAggregate();
51 
52  KyGuid GetGUID() { return m_descriptor.m_guid; }
53 
54 private:
55  KyResult OnLoaded();
56 
57 public:
58  Ptr<BlobAggregate> m_blobAggregate;
59  Ptr<HeightField> m_heightfield;
60  ColDataSectorDescriptor m_descriptor;
61 };
62 
63 }
64 
Base interface for a class that opens a file on disk.
Definition: fileopener.h:30
The CollisionData class represents Collision Data that will be added to a CollisionWorld.
Definition: collisiondata.h:30
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:196
Little-endian format (used, for example, for Windows, Linux).
Definition: endianness.h:22
Navigation return code class.
Definition: types.h:108
WorldElementType
Enumerates the WorldElement types.
Definition: worldelementtype.h:13
Base internal class used to represent elements that can be added to a World, such as instances of Dat...
Definition: worldelement.h:41
The Autodesk Navigation namespace.
Definition: gamekitcrowddispersion.cpp:17
The KyGuid class represents a globally unique ID.
Definition: kyguid.h:20
KyGuid m_guid
Index of the Lab's database in which the NavData will be added to.
Definition: collisiondatasectordescriptor.h:82
Type
Enumerates possible endianness types.
Definition: endianness.h:20
Easy to write/read version of SectorDescriptorBlob.
Definition: collisiondatasectordescriptor.h:42
KyResult Load(const char *fileName, FileOpenerBase *fileOpener=nullptr)
Load data from .ColData files created by the Autodesk Navigation Generation framework.
Definition: collisiondata.cpp:27