-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
com.lifewriter.application.nonvirtualobjectinterface.actiondefined.xml
91 lines (66 loc) · 3.81 KB
/
com.lifewriter.application.nonvirtualobjectinterface.actiondefined.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?xml version="1.0" encoding="utf-8"?>
//ifndef HK_CHARACTER_PROXY_LISTENER_H
//define HK_CHARACTER_PROXY_LISTENER_H
//include <Physics2012/Collide/Query/Collector/PointCollector/hkpRootCdPoint.h>
class hkContactPoint;
class hkpRigidBody;
class hkpCharacterProxy;
struct hkSimplexSolverInput;
// A character interaction event is passed to a listeners objectInteractionCallback() when the character proxy hits another object;
// This even contains information that allows the user to recalculate or override the impulse that will be applied to the object and character;
object:
struct hkpCharacterObjectInteractionEvent;
//HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_UTILITIES, hkpCharacterObjectInteractionEvent );
// The position of the contact with the object in world space
hkVector4 m_position;
// The normal at the point of contact. Note that the .w value is the distance between the surfaces.
hkVector4 m_normal;
// The magnitude of the impulse that will be applied if not overridden;
// This can be useful when playing sound or calculating damage
hkReal m_objectImpulse;
// Time slice information - passed on from hkpCharacterProxy::integrate
hkReal m_timestep;
// The magnitude of the relative velocity along the normal;
hkReal m_projectedVelocity;
// Mass information for the object (projected along the normal)
hkReal m_objectMassInv;
// A pointer to the body that was hit;
// If the character did not hit a body this will be HK_NULL
hkpRigidBody* m_body;
};
// The result structure is initialized and then passed to a listener's objectInteractionCallback();
// the user can choose to change these values and effect how the character will interact with objects;
object:
struct hkpCharacterObjectInteractionResult;
{
//HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR( HK_MEMORY_CLASS_UTILITIES, hkpCharacterObjectInteractionResult );
// The impulse that will be applied to object
hkVector4 m_objectImpulse;
// The point in world space where the object impulse will be applied
hkVector4 m_impulsePosition;
};
// Instances of this listener can be registered with a hkpCharacterProxy, and are used for catching contact points,
// for updating the manifold before it is passed to the simplex solver and for handling how the character interacts with
// dynamic objects in the scene.
class hkpCharacterProxyListener
{
public:
HK_DECLARE_NONVIRTUAL_CLASS_ALLOCATOR(HK_MEMORY_CLASS_BASE,hkpCharacterProxyListener);
//
virtual ~hkpCharacterProxyListener() { }
// Called before the simple solver is called;
// The manifold is passed so the user can retrieve body information if necessary;
// This allows the user to override of add any information stored in the plane equations passed to the simplex solver;
virtual void processConstraintsCallback( const hkpCharacterProxy* proxy, const hkArray<hkpRootCdPoint>& manifold, hkSimplexSolverInput& input ) {}
// Called when a new contact point is taken from the results of the linear cast and added to the current manifold;
virtual void contactPointAddedCallback( const hkpCharacterProxy* proxy, const hkpRootCdPoint& point) {}
// Called when a new contact point is discarded from the current manifold;
virtual void contactPointRemovedCallback( const hkpCharacterProxy* proxy, const hkpRootCdPoint& point) {}
// Called when the character interacts with another character
virtual void; characterInteractionCallback(hkpCharacterProxy* proxy, hkpCharacterProxy* otherProxy, const hkContactPoint& contact) {}
// Called when the character interacts with another (non fixed or keyframed) rigid body;
virtual void objectInteractionCallback(hkpCharacterProxy* proxy, const hkpCharacterObjectInteractionEvent& input, hkpCharacterObjectInteractionResult& output ) {}
};
//HK_CHARACTER_PROXY_LISTENER_H
onsave(create.lifewriter)
bring back christ,then unthreaddeath