Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
GroupFilter.h
Go to the documentation of this file.
1// Jolt Physics Library (https://github.com/jrouwe/JoltPhysics)
2// SPDX-FileCopyrightText: 2021 Jorrit Rouwe
3// SPDX-License-Identifier: MIT
4
5#pragma once
6
7#include <Jolt/Core/Result.h>
9
11
12class CollisionGroup;
13class StreamIn;
14class StreamOut;
15
17class JPH_EXPORT GroupFilter : public SerializableObject, public RefTarget<GroupFilter>
18{
19public:
21
22
23 virtual ~GroupFilter() override = default;
24
26 virtual bool CanCollide(const CollisionGroup &inGroup1, const CollisionGroup &inGroup2) const = 0;
27
29 virtual void SaveBinaryState(StreamOut &inStream) const;
30
32
34 static GroupFilterResult sRestoreFromBinaryState(StreamIn &inStream);
35
36protected:
38 virtual void RestoreBinaryState(StreamIn &inStream);
39};
40
#define JPH_EXPORT
Definition: Core.h:236
#define JPH_NAMESPACE_END
Definition: Core.h:378
#define JPH_NAMESPACE_BEGIN
Definition: Core.h:372
#define JPH_DECLARE_SERIALIZABLE_ABSTRACT(linkage, class_name)
Definition: SerializableObject.h:120
Definition: CollisionGroup.h:20
Abstract class that checks if two CollisionGroups collide.
Definition: GroupFilter.h:18
Definition: Reference.h:101
Definition: Reference.h:35
Helper class that either contains a valid result or an error.
Definition: Result.h:12
Definition: SerializableObject.h:156
Simple binary input stream.
Definition: StreamIn.h:13
Simple binary output stream.
Definition: StreamOut.h:13