gwnavruntime/collision/collisiondata.h Source File

collisiondata.h
Go to the documentation of this file.
1 /*
2 * Copyright 2015 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 // primary contact: JAPA - secondary contact: GUAL
8 #ifndef Navigation_CollisionData_H
9 #define Navigation_CollisionData_H
10 
19 
20 namespace Kaim
21 {
22 
23 class FileOpenerBase;
24 class File;
25 class ICollisionInterface;
26 
31 
32 class CollisionData : public WorldElement
33 {
35 public:
36  static WorldElementType GetStaticType() { return TypeColData; }
37  virtual WorldElementType GetType() const { return TypeColData; }
38  virtual const char* GetTypeName() const { return "ColData"; }
39 
40  CollisionData() {}
41  ~CollisionData();
42 
43  void Clear();
44 
47  KyResult Load(const char* fileName, FileOpenerBase* fileOpener = KY_NULL);
48  KyResult LoadFromMemory(void* memory);
49 
50  KyResult Save(const char* fileName, FileOpenerBase* fileOpener = KY_NULL, Endianness::Type endianness = Endianness::BigEndian);
51 
52  void AddDescriptorToBlobAggregate();
53 
54  KyGuid GetGUID() { return m_descriptor.m_guid; }
55 
56 private:
57  KyResult OnLoaded();
58 
59 public:
60  Ptr<BlobAggregate> m_blobAggregate;
61  Ptr<HeightField> m_heightfield;
62  ColDataSectorDescriptor m_descriptor;
63 };
64 
65 }
66 
67 #endif // Navigation_CollisionData_H
KyInt32 KyResult
Defines a type that can be returned by methods or functions in the Gameware Navigation SDK to indicat...
Definition: types.h:254
The CollisionData class represents Collision Data that will be added to a CollisionWorld.
Definition: collisiondata.h:34
KyResult Load(const char *fileName, FileOpenerBase *fileOpener=0)
Load data from .ColData files created by the Gameware Navigation Generation framework.
#define KY_NULL
Null value.
Definition: types.h:247
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
Big-endian format (used, for example, for PlayStation 3, Xbox 360).
Definition: endianness.h:31
WorldElementType
Enumerates the WorldElement types.
Definition: worldelementtype.h:15
Definition: gamekitcrowddispersion.h:20
KyGuid m_guid
Index of the Lab's database in which the NavData will be added to.
Definition: collisiondatasectordescriptor.h:92
Type
Enumerates possible endianness types.
Definition: endianness.h:28