mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
more afx constraint mmebervar cleanups
This commit is contained in:
parent
adb60f81df
commit
fa2b0761a7
2 changed files with 473 additions and 473 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -94,30 +94,30 @@ class afxConstraint : public SimObject, public afxEffectDefs
|
||||||
typedef SimObject Parent;
|
typedef SimObject Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
afxConstraintMgr* mgr;
|
afxConstraintMgr* mMgr;
|
||||||
afxConstraintDef cons_def;
|
afxConstraintDef mCons_def;
|
||||||
bool is_defined;
|
bool mIs_defined;
|
||||||
bool is_valid;
|
bool mIs_valid;
|
||||||
Point3F last_pos;
|
Point3F mLast_pos;
|
||||||
MatrixF last_xfm;
|
MatrixF mLast_xfm;
|
||||||
F32 history_time;
|
F32 mHistory_time;
|
||||||
bool is_alive;
|
bool mIs_alive;
|
||||||
bool gone_missing;
|
bool mGone_missing;
|
||||||
U32 change_code;
|
U32 mChange_code;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxConstraint(afxConstraintMgr*);
|
/*C*/ afxConstraint(afxConstraintMgr*);
|
||||||
virtual ~afxConstraint();
|
virtual ~afxConstraint();
|
||||||
|
|
||||||
virtual bool getPosition(Point3F& pos, F32 hist=0.0f)
|
virtual bool getPosition(Point3F& pos, F32 hist=0.0f)
|
||||||
{ pos = last_pos; return is_valid; }
|
{ pos = mLast_pos; return mIs_valid; }
|
||||||
virtual bool getTransform(MatrixF& xfm, F32 hist=0.0f)
|
virtual bool getTransform(MatrixF& xfm, F32 hist=0.0f)
|
||||||
{ xfm = last_xfm; return is_valid;}
|
{ xfm = mLast_xfm; return mIs_valid;}
|
||||||
virtual bool getAltitudes(F32& terrain_alt, F32& interior_alt) { return false; }
|
virtual bool getAltitudes(F32& terrain_alt, F32& interior_alt) { return false; }
|
||||||
|
|
||||||
virtual bool isDefined() { return is_defined; }
|
virtual bool isDefined() { return mIs_defined; }
|
||||||
virtual bool isValid() { return is_valid; }
|
virtual bool isValid() { return mIs_valid; }
|
||||||
virtual U32 getChangeCode() { return change_code; }
|
virtual U32 getChangeCode() { return mChange_code; }
|
||||||
|
|
||||||
virtual U32 setAnimClip(const char* clip, F32 pos, F32 rate, F32 trans, bool is_death_anim)
|
virtual U32 setAnimClip(const char* clip, F32 pos, F32 rate, F32 trans, bool is_death_anim)
|
||||||
{ return 0; };
|
{ return 0; };
|
||||||
|
|
@ -127,8 +127,8 @@ public:
|
||||||
virtual F32 getAnimClipDuration(const char* clip) { return 0.0f; }
|
virtual F32 getAnimClipDuration(const char* clip) { return 0.0f; }
|
||||||
|
|
||||||
virtual S32 getDamageState() { return -1; }
|
virtual S32 getDamageState() { return -1; }
|
||||||
virtual void setLivingState(bool state) { is_alive = state; };
|
virtual void setLivingState(bool state) { mIs_alive = state; };
|
||||||
virtual bool getLivingState() { return is_alive; };
|
virtual bool getLivingState() { return mIs_alive; };
|
||||||
|
|
||||||
virtual void sample(F32 dt, U32 elapsed_ms, const Point3F* cam_pos)=0;
|
virtual void sample(F32 dt, U32 elapsed_ms, const Point3F* cam_pos)=0;
|
||||||
|
|
||||||
|
|
@ -175,15 +175,15 @@ class afxConstraintMgr : public afxEffectDefs
|
||||||
U32 type;
|
U32 type;
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector<afxConstraintList*> constraints_v;
|
Vector<afxConstraintList*> mConstraints_v;
|
||||||
|
|
||||||
Vector<StringTableEntry> names_on_server;
|
Vector<StringTableEntry> mNames_on_server;
|
||||||
Vector<S32> ghost_ids;
|
Vector<S32> mGhost_ids;
|
||||||
Vector<preDef> predefs;
|
Vector<preDef> mPredefs;
|
||||||
U32 starttime;
|
U32 mStartTime;
|
||||||
bool on_server;
|
bool mOn_server;
|
||||||
bool initialized;
|
bool mInitialized;
|
||||||
F32 scoping_dist_sq;
|
F32 mScoping_dist_sq;
|
||||||
|
|
||||||
SceneObject* find_object_from_name(StringTableEntry);
|
SceneObject* find_object_from_name(StringTableEntry);
|
||||||
S32 find_cons_idx_from_name(StringTableEntry);
|
S32 find_cons_idx_from_name(StringTableEntry);
|
||||||
|
|
@ -221,7 +221,7 @@ public:
|
||||||
|
|
||||||
void sample(F32 dt, U32 now, const Point3F* cam_pos=0);
|
void sample(F32 dt, U32 now, const Point3F* cam_pos=0);
|
||||||
|
|
||||||
void setStartTime(U32 timestamp) { starttime = timestamp; }
|
void setStartTime(U32 timestamp) { mStartTime = timestamp; }
|
||||||
void initConstraintDefs(Vector<afxConstraintDef>&, bool on_server, F32 scoping_dist=-1.0f);
|
void initConstraintDefs(Vector<afxConstraintDef>&, bool on_server, F32 scoping_dist=-1.0f);
|
||||||
void packConstraintNames(NetConnection* conn, BitStream* stream);
|
void packConstraintNames(NetConnection* conn, BitStream* stream);
|
||||||
void unpackConstraintNames(BitStream* stream);
|
void unpackConstraintNames(BitStream* stream);
|
||||||
|
|
@ -245,7 +245,7 @@ public:
|
||||||
void restoreScopedObject(SceneObject*, afxChoreographer* ch);
|
void restoreScopedObject(SceneObject*, afxChoreographer* ch);
|
||||||
void adjustProcessOrdering(afxChoreographer*);
|
void adjustProcessOrdering(afxChoreographer*);
|
||||||
|
|
||||||
F32 getScopingDistanceSquared() const { return scoping_dist_sq; }
|
F32 getScopingDistanceSquared() const { return mScoping_dist_sq; }
|
||||||
};
|
};
|
||||||
|
|
||||||
inline afxConstraintID afxConstraintMgr::setReferencePoint(StringTableEntry which, Point3F point)
|
inline afxConstraintID afxConstraintMgr::setReferencePoint(StringTableEntry which, Point3F point)
|
||||||
|
|
@ -270,8 +270,8 @@ class afxPointConstraint : public afxConstraint
|
||||||
typedef afxConstraint Parent;
|
typedef afxConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Point3F point;
|
Point3F mPoint;
|
||||||
Point3F vector;
|
Point3F mVector;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxPointConstraint(afxConstraintMgr*);
|
/*C*/ afxPointConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -329,11 +329,11 @@ class afxShapeConstraint : public afxConstraint
|
||||||
typedef afxConstraint Parent;
|
typedef afxConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StringTableEntry arb_name;
|
StringTableEntry mArb_name;
|
||||||
ShapeBase* shape;
|
ShapeBase* mShape;
|
||||||
U16 scope_id;
|
U16 mScope_id;
|
||||||
U32 clip_tag;
|
U32 mClip_tag;
|
||||||
U32 lock_tag;
|
U32 mLock_tag;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxShapeConstraint(afxConstraintMgr*);
|
/*C*/ afxShapeConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -354,9 +354,9 @@ public:
|
||||||
|
|
||||||
virtual S32 getDamageState();
|
virtual S32 getDamageState();
|
||||||
|
|
||||||
virtual SceneObject* getSceneObject() { return shape; }
|
virtual SceneObject* getSceneObject() { return mShape; }
|
||||||
virtual void restoreObject(SceneObject*);
|
virtual void restoreObject(SceneObject*);
|
||||||
virtual U16 getScopeId() { return scope_id; }
|
virtual U16 getScopeId() { return mScope_id; }
|
||||||
virtual U32 getTriggers();
|
virtual U32 getTriggers();
|
||||||
|
|
||||||
virtual void onDeleteNotify(SimObject*);
|
virtual void onDeleteNotify(SimObject*);
|
||||||
|
|
@ -373,8 +373,8 @@ class afxShapeNodeConstraint : public afxShapeConstraint
|
||||||
typedef afxShapeConstraint Parent;
|
typedef afxShapeConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StringTableEntry arb_node;
|
StringTableEntry mArb_node;
|
||||||
S32 shape_node_ID;
|
S32 mShape_node_ID;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxShapeNodeConstraint(afxConstraintMgr*);
|
/*C*/ afxShapeNodeConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -385,7 +385,7 @@ public:
|
||||||
virtual void sample(F32 dt, U32 elapsed_ms, const Point3F* cam_pos);
|
virtual void sample(F32 dt, U32 elapsed_ms, const Point3F* cam_pos);
|
||||||
virtual void restoreObject(SceneObject*);
|
virtual void restoreObject(SceneObject*);
|
||||||
|
|
||||||
S32 getNodeID() const { return shape_node_ID; }
|
S32 getNodeID() const { return mShape_node_ID; }
|
||||||
|
|
||||||
virtual void onDeleteNotify(SimObject*);
|
virtual void onDeleteNotify(SimObject*);
|
||||||
};
|
};
|
||||||
|
|
@ -441,11 +441,11 @@ class afxEffectConstraint : public afxConstraint
|
||||||
typedef afxConstraint Parent;
|
typedef afxConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StringTableEntry effect_name;
|
StringTableEntry mEffect_name;
|
||||||
afxEffectWrapper* effect;
|
afxEffectWrapper* mEffect;
|
||||||
U32 clip_tag;
|
U32 mClip_tag;
|
||||||
bool is_death_clip;
|
bool mIs_death_clip;
|
||||||
U32 lock_tag;
|
U32 mLock_tag;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxEffectConstraint(afxConstraintMgr*);
|
/*C*/ afxEffectConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -480,8 +480,8 @@ class afxEffectNodeConstraint : public afxEffectConstraint
|
||||||
typedef afxEffectConstraint Parent;
|
typedef afxEffectConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
StringTableEntry effect_node;
|
StringTableEntry mEffect_node;
|
||||||
S32 effect_node_ID;
|
S32 mEffect_node_ID;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxEffectNodeConstraint(afxConstraintMgr*);
|
/*C*/ afxEffectNodeConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -492,7 +492,7 @@ public:
|
||||||
|
|
||||||
virtual void set(afxEffectWrapper* effect);
|
virtual void set(afxEffectWrapper* effect);
|
||||||
|
|
||||||
S32 getNodeID() const { return effect_node_ID; }
|
S32 getNodeID() const { return mEffect_node_ID; }
|
||||||
};
|
};
|
||||||
|
|
||||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||||
|
|
@ -501,13 +501,13 @@ public:
|
||||||
class afxSampleBuffer
|
class afxSampleBuffer
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
U32 buffer_sz;
|
U32 mBuffer_sz;
|
||||||
U32 buffer_ms;
|
U32 mBuffer_ms;
|
||||||
U32 ms_per_sample;
|
U32 mMS_per_sample;
|
||||||
U32 elapsed_ms;
|
U32 mElapsed_ms;
|
||||||
U32 last_sample_ms;
|
U32 mLast_sample_ms;
|
||||||
U32 next_sample_num;
|
U32 mNext_sample_num;
|
||||||
U32 n_samples;
|
U32 mNum_samples;
|
||||||
|
|
||||||
virtual void recSample(U32 idx, void* data) = 0;
|
virtual void recSample(U32 idx, void* data) = 0;
|
||||||
bool compute_idx_from_lag(F32 lag, U32& idx);
|
bool compute_idx_from_lag(F32 lag, U32& idx);
|
||||||
|
|
@ -530,7 +530,7 @@ class afxSampleXfmBuffer : public afxSampleBuffer
|
||||||
typedef afxSampleBuffer Parent;
|
typedef afxSampleBuffer Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
MatrixF* xfm_buffer;
|
MatrixF* mXfm_buffer;
|
||||||
|
|
||||||
virtual void recSample(U32 idx, void* data);
|
virtual void recSample(U32 idx, void* data);
|
||||||
|
|
||||||
|
|
@ -552,7 +552,7 @@ class afxPointHistConstraint : public afxPointConstraint
|
||||||
typedef afxPointConstraint Parent;
|
typedef afxPointConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
afxSampleBuffer* samples;
|
afxSampleBuffer* mSamples;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxPointHistConstraint(afxConstraintMgr*);
|
/*C*/ afxPointHistConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -575,7 +575,7 @@ class afxTransformHistConstraint : public afxTransformConstraint
|
||||||
typedef afxTransformConstraint Parent;
|
typedef afxTransformConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
afxSampleBuffer* samples;
|
afxSampleBuffer* mSamples;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxTransformHistConstraint(afxConstraintMgr*);
|
/*C*/ afxTransformHistConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -598,7 +598,7 @@ class afxShapeHistConstraint : public afxShapeConstraint
|
||||||
typedef afxShapeConstraint Parent;
|
typedef afxShapeConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
afxSampleBuffer* samples;
|
afxSampleBuffer* mSamples;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxShapeHistConstraint(afxConstraintMgr*);
|
/*C*/ afxShapeHistConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -625,7 +625,7 @@ class afxShapeNodeHistConstraint : public afxShapeNodeConstraint
|
||||||
typedef afxShapeNodeConstraint Parent;
|
typedef afxShapeNodeConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
afxSampleBuffer* samples;
|
afxSampleBuffer* mSamples;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxShapeNodeHistConstraint(afxConstraintMgr*);
|
/*C*/ afxShapeNodeHistConstraint(afxConstraintMgr*);
|
||||||
|
|
@ -654,7 +654,7 @@ class afxObjectHistConstraint : public afxObjectConstraint
|
||||||
typedef afxObjectConstraint Parent;
|
typedef afxObjectConstraint Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
afxSampleBuffer* samples;
|
afxSampleBuffer* mSamples;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
afxObjectHistConstraint(afxConstraintMgr*);
|
afxObjectHistConstraint(afxConstraintMgr*);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue