![]() |
Leviathan
0.8.0.0
Leviathan game engine
|
#include <Constraints.h>
Public Member Functions | |
DLLEXPORT | BaseConstraint (ENTITY_CONSTRAINT_TYPE type, GameWorld *world, Constraintable &first, Constraintable &second) |
DLLEXPORT | BaseConstraint (ENTITY_CONSTRAINT_TYPE type, GameWorld *world, Constraintable &first, Constraintable &second, int id) |
Variant for forcing id. More... | |
virtual DLLEXPORT | ~BaseConstraint () |
virtual DLLEXPORT bool | Init () |
Actually creates the Newton joint. More... | |
DLLEXPORT void | Release () |
Calls the Newton destroy function. More... | |
DLLEXPORT void | Destroy (Constraintable *skipthis=nullptr) |
Call to destroy this constraint. More... | |
DLLEXPORT ENTITY_CONSTRAINT_TYPE | GetType () const |
DLLEXPORT Constraintable & | GetFirstEntity () const |
Gets the first object. More... | |
DLLEXPORT Constraintable & | GetSecondEntity () const |
Gets the second object. More... | |
DLLEXPORT int | GetID () const |
Returns ID. More... | |
![]() | |
DLLEXPORT | ThreadSafeGeneric () |
DLLEXPORT | ~ThreadSafeGeneric () |
FORCE_INLINE void | VerifyLock (RecursiveLock &guard) const |
FORCE_INLINE void | VerifyLock (Lock &lockit) const |
Protected Member Functions | |
virtual DLLEXPORT bool | _CheckParameters () |
virtual DLLEXPORT bool | _CreateActualJoint () |
Protected Attributes | |
Constraintable & | FirstObject |
Constraintable & | SecondObject |
int | ID |
Server and client matching identifier for deleting constraints. More... | |
GameWorld * | OwningWorld |
NewtonJoint * | Joint |
ENTITY_CONSTRAINT_TYPE | Type |
Constraint type used by serializers to identify the type. More... | |
![]() | |
MutexType | ObjectsLock |
Base class for all different types of constraints to inherit
Definition at line 42 of file Constraints.h.
DLLEXPORT BaseConstraint::BaseConstraint | ( | ENTITY_CONSTRAINT_TYPE | type, |
GameWorld * | world, | ||
Constraintable & | first, | ||
Constraintable & | second | ||
) |
Definition at line 9 of file Constraints.cpp.
DLLEXPORT BaseConstraint::BaseConstraint | ( | ENTITY_CONSTRAINT_TYPE | type, |
GameWorld * | world, | ||
Constraintable & | first, | ||
Constraintable & | second, | ||
int | id | ||
) |
Variant for forcing id.
Used for receiving from network
Definition at line 18 of file Constraints.cpp.
|
virtual |
Definition at line 26 of file Constraints.cpp.
|
protectedvirtual |
Reimplemented in Leviathan::SliderConstraint.
Definition at line 62 of file Constraints.cpp.
|
protectedvirtual |
Reimplemented in Leviathan::SliderConstraint.
Definition at line 67 of file Constraints.cpp.
DLLEXPORT void BaseConstraint::Destroy | ( | Constraintable * | skipthis = nullptr | ) |
Call to destroy this constraint.
skipthis | Skips removing from this side, avoid unlinking multiple times from one side when it is being destructed |
Definition at line 52 of file Constraints.cpp.
DLLEXPORT Constraintable & BaseConstraint::GetFirstEntity | ( | ) | const |
DLLEXPORT int BaseConstraint::GetID | ( | ) | const |
Returns ID.
Definition at line 57 of file Constraints.cpp.
DLLEXPORT Constraintable & BaseConstraint::GetSecondEntity | ( | ) | const |
|
inline |
Definition at line 72 of file Constraints.h.
|
virtual |
Actually creates the Newton joint.
The Constraint won't work without calling this
Definition at line 30 of file Constraints.cpp.
DLLEXPORT void BaseConstraint::Release | ( | ) |
Calls the Newton destroy function.
Definition at line 47 of file Constraints.cpp.
|
protected |
Definition at line 91 of file Constraints.h.
|
protected |
Server and client matching identifier for deleting constraints.
Definition at line 95 of file Constraints.h.
|
protected |
Definition at line 100 of file Constraints.h.
|
protected |
Definition at line 99 of file Constraints.h.
|
protected |
Definition at line 92 of file Constraints.h.
|
protected |
Constraint type used by serializers to identify the type.
Definition at line 103 of file Constraints.h.