2 #include "IGameObject.h" 3 #include "ShadowVolume.h" 4 #include "BipedWayPoint.h" 8 struct IParaPhysicsActor;
65 virtual std::string
ToString(DWORD nMethod);
66 virtual CBaseObject::_SceneObjectType GetType(){
return CBaseObject::BipedObject; };
68 typedef std::list<BipedWayPoint> WayPointList_type;
101 static const float SPEED_TURN;
103 static const float SPEED_WALK;
105 static const float SPEED_NORM_TURN;
132 ATTRIBUTE_METHOD1(
CBipedObject, GetPhysicsRadius_s,
float*) { *p1 = cls->GetPhysicsRadius();
return S_OK; }
133 ATTRIBUTE_METHOD1(
CBipedObject, SetPhysicsRadius_s,
float) { cls->SetPhysicsRadius(p1);
return S_OK; }
135 ATTRIBUTE_METHOD1(
CBipedObject, GetPhysicsHeight_s,
float*) { *p1 = cls->GetPhysicsHeight();
return S_OK; }
136 ATTRIBUTE_METHOD1(
CBipedObject, SetPhysicsHeight_s,
float) { cls->SetPhysicsHeight(p1);
return S_OK; }
138 ATTRIBUTE_METHOD1(
CBipedObject, GetSizeScale_s,
float*) { *p1 = cls->GetSizeScale();
return S_OK; }
139 ATTRIBUTE_METHOD1(
CBipedObject, SetSizeScale_s,
float) { cls->SetSizeScale(p1);
return S_OK; }
141 ATTRIBUTE_METHOD1(
CBipedObject, GetDensity_s,
float*) { *p1 = cls->GetDensity();
return S_OK; }
142 ATTRIBUTE_METHOD1(
CBipedObject, SetDensity_s,
float) { cls->SetDensity(p1);
return S_OK; }
144 ATTRIBUTE_METHOD1(
CBipedObject, GetSpeedScale_s,
float*) { *p1 = cls->GetSpeedScale();
return S_OK; }
145 ATTRIBUTE_METHOD1(
CBipedObject, SetSpeedScale_s,
float) { cls->SetSpeedScale(p1);
return S_OK; }
147 ATTRIBUTE_METHOD1(
CBipedObject, GetCurrentAnimation_s,
int*) { *p1 = cls->GetCurrentAnimation();
return S_OK; }
148 ATTRIBUTE_METHOD1(
CBipedObject, PlayAnimation_s,
int) { cls->PlayAnimation(p1);
return S_OK; }
149 ATTRIBUTE_METHOD(
CBipedObject, DumpBVHAnimations_s) { cls->DumpBVHAnimations();
return S_OK; }
151 ATTRIBUTE_METHOD1(
CBipedObject, GetHeadTurningAngle_s,
float*) { *p1 = cls->GetHeadTurningAngle();
return S_OK; }
152 ATTRIBUTE_METHOD1(
CBipedObject, SetHeadTurningAngle_s,
float) { cls->SetHeadTurningAngle(p1);
return S_OK; }
154 ATTRIBUTE_METHOD1(
CBipedObject, GetHeadUpdownAngle_s,
float*) { *p1 = cls->GetHeadUpdownAngle();
return S_OK; }
155 ATTRIBUTE_METHOD1(
CBipedObject, SetHeadUpdownAngle_s,
float) { cls->SetHeadUpdownAngle(p1);
return S_OK; }
157 ATTRIBUTE_METHOD1(
CBipedObject, GetBootHeight_s,
float*) { *p1 = cls->GetBootHeight();
return S_OK; }
158 ATTRIBUTE_METHOD1(
CBipedObject, SetBootHeight_s,
float) { cls->SetBootHeight(p1);
return S_OK; }
160 ATTRIBUTE_METHOD1(
CBipedObject, GetMovementStyle_s,
int*) { *p1 = cls->GetMovementStyle();
return S_OK; }
163 ATTRIBUTE_METHOD1(
CBipedObject, GetSpeed_s,
float*) { *p1 = cls->GetSpeed();
return S_OK; }
164 ATTRIBUTE_METHOD1(
CBipedObject, SetSpeed_s,
float) { cls->SetSpeed(p1);
return S_OK; }
166 ATTRIBUTE_METHOD1(
CBipedObject, GetLastSpeed_s,
float*) { *p1 = cls->GetLastSpeed();
return S_OK; }
167 ATTRIBUTE_METHOD1(
CBipedObject, SetLastSpeed_s,
float) { cls->SetLastSpeed(p1);
return S_OK; }
169 ATTRIBUTE_METHOD1(
CBipedObject, GetAccelerationDist_s,
float*) { *p1 = cls->GetAccelerationDist();
return S_OK; }
170 ATTRIBUTE_METHOD1(
CBipedObject, SetAccelerationDist_s,
float) { cls->SetAccelerationDist(p1);
return S_OK; }
172 ATTRIBUTE_METHOD1(
CBipedObject, GetVerticalSpeed_s,
float*) { *p1 = cls->GetVerticalSpeed();
return S_OK; }
173 ATTRIBUTE_METHOD1(
CBipedObject, SetVerticalSpeed_s,
float) { cls->SetVerticalSpeed(p1);
return S_OK; }
175 ATTRIBUTE_METHOD1(
CBipedObject, GetPhysicsGroupSensorMask_s, DWORD*) { *p1 = cls->GetPhysicsGroupMask();
return S_OK; }
176 ATTRIBUTE_METHOD1(
CBipedObject, SetPhysicsGroupSensorMask_s, DWORD) { cls->SetPhysicsGroupMask(p1);
return S_OK; }
178 ATTRIBUTE_METHOD1(
CBipedObject, GetMaxSpeed_s,
float*) { *p1 = cls->GetMaxSpeed();
return S_OK; }
180 ATTRIBUTE_METHOD(
CBipedObject, ForceStop_s) { cls->ForceStop();
return S_OK; }
182 ATTRIBUTE_METHOD(
CBipedObject, ForceMove_s) { cls->ForceMove();
return S_OK; }
184 ATTRIBUTE_METHOD1(
CBipedObject, GetIsAlwaysAboveTerrain_s,
bool*) { *p1 = cls->GetIsAlwaysAboveTerrain();
return S_OK; }
185 ATTRIBUTE_METHOD1(
CBipedObject, SetIsAlwaysAboveTerrain_s,
bool) { cls->SetIsAlwaysAboveTerrain(p1);
return S_OK; }
187 ATTRIBUTE_METHOD1(
CBipedObject, GetIsAnimPaused_s,
bool*) { *p1 = cls->GetIsAnimPaused();
return S_OK; }
188 ATTRIBUTE_METHOD1(
CBipedObject, SetIsAnimPaused_s,
bool) { cls->SetIsAnimPaused(p1);
return S_OK; }
190 ATTRIBUTE_METHOD1(
CBipedObject, SetBlendingFactor_s,
float) { cls->SetBlendingFactor(p1);
return S_OK; }
193 ATTRIBUTE_METHOD1(
CBipedObject, GetLastWayPointType_s,
int*) { *p1 = cls->GetLastWayPoint().GetPointType();
return S_OK; }
194 ATTRIBUTE_METHOD1(
CBipedObject, GetLastWayPointPos_s,
Vector3*) { *p1 = cls->GetLastWayPoint().GetPosition();
return S_OK; }
196 ATTRIBUTE_METHOD1(
CBipedObject, GetGravity_s,
float*) { *p1 = cls->GetGravity();
return S_OK; }
197 ATTRIBUTE_METHOD1(
CBipedObject, SetGravity_s,
float) { cls->SetGravity(p1);
return S_OK; }
199 ATTRIBUTE_METHOD1(
CBipedObject, GetIgnoreSlopeCollision_s,
bool*) { *p1 = cls->GetIgnoreSlopeCollision();
return S_OK; }
200 ATTRIBUTE_METHOD1(
CBipedObject, SetIgnoreSlopeCollision_s,
bool) { cls->SetIgnoreSlopeCollision(p1);
return S_OK; }
202 ATTRIBUTE_METHOD1(
CBipedObject, GetCanFly_s,
bool*) { *p1 = cls->GetCanFly();
return S_OK; }
203 ATTRIBUTE_METHOD1(
CBipedObject, SetCanFly_s,
bool) { cls->SetCanFly(p1);
return S_OK; }
205 ATTRIBUTE_METHOD1(
CBipedObject, GetAlwaysFlying_s,
bool*) { *p1 = cls->GetAlwaysFlying();
return S_OK; }
206 ATTRIBUTE_METHOD1(
CBipedObject, SetAlwaysFlying_s,
bool) { cls->SetAlwaysFlying(p1);
return S_OK; }
208 ATTRIBUTE_METHOD1(
CBipedObject, GetIsFlying_s,
bool*) { *p1 = cls->GetIsFlying();
return S_OK; }
210 ATTRIBUTE_METHOD1(
CBipedObject, GetFlyUsingCameraDir_s,
bool*) { *p1 = cls->GetFlyUsingCameraDir();
return S_OK; }
211 ATTRIBUTE_METHOD1(
CBipedObject, SetFlyUsingCameraDir_s,
bool) { cls->SetFlyUsingCameraDir(p1);
return S_OK; }
213 ATTRIBUTE_METHOD1(
CBipedObject, IsAutoWalkupBlock_s,
bool*) { *p1 = cls->IsAutoWalkupBlock();
return S_OK; }
214 ATTRIBUTE_METHOD1(
CBipedObject, SetAutoWalkupBlock_s,
bool) { cls->SetAutoWalkupBlock(p1);
return S_OK; }
216 ATTRIBUTE_METHOD1(
CBipedObject, IsControlledExternally_s,
bool*) { *p1 = cls->IsControlledExternally();
return S_OK; }
217 ATTRIBUTE_METHOD1(
CBipedObject, SetIsControlledExternally_s,
bool) { cls->SetIsControlledExternally(p1);
return S_OK; }
227 bool MoveTowards(
double dTimeDelta,
const DVector3& vPosTarget,
float fStopDistance,
bool * pIsSlidingWall = NULL);
270 bool FlyTowards(
double dTimeDelta,
const DVector3& vPosTarget,
float fStopDistance,
bool * pIsSlidingWall);
278 bool CanAnimOpacity()
const;
343 virtual void Animate(
double dTimeDelta,
int nRenderNumber = 0);
349 virtual void SetNormal(
const Vector3 & pNorm);
367 virtual void Reset();
374 virtual void AnimateBiped(
double dTimeDelta,
bool bSharpTurning =
false );
443 void RemoveWayPoint();
477 virtual void SetRoll(
float fValue);
482 virtual void SetPitch(
float fValue);
485 virtual void SetYaw(
float fFacing);
507 virtual void SetOpacity(
float fOpacity);
527 void SetLastSpeed(
float fSpeed);
533 void SetAccelerationDist(
float fAccelerationDist = 0.f);
570 void SetGravity(
float gravity);
573 void SetIgnoreSlopeCollision(
bool ignoreSlope);
574 bool GetIgnoreSlopeCollision();
576 void SetCanFly(
bool canFly);
579 bool GetAlwaysFlying()
const;
580 void SetAlwaysFlying(
bool val);
582 bool GetFlyUsingCameraDir()
const;
583 void SetFlyUsingCameraDir(
bool val);
587 void SetFlyingDirection(
const Vector3 *dir);
596 void SetIsControlledExternally(
bool val);
603 virtual bool IsStanding();
632 void PlayAnimation(DWORD nIndex,
bool bUpdateSpeed =
true,
bool bAppend =
false);
642 void PlayAnimation(
const char* sName,
bool bUpdateSpeed =
true,
bool bAppend =
false);
669 virtual bool IsAnimEnabled();
673 virtual void SetTime(
int nTime);
719 void SetNextTargetPosition(
const DVector3 &pV,
bool bIgnoreHeight =
true);
742 void JumpUpward(
float fVerticalSpeed,
bool bJumpFromGround);
759 void ResetBipedPosition(
const Vector3 *pV,
bool bIgnoreHeight =
true);
761 virtual void Rotate(
float x,
float y,
float z);
797 virtual bool IsShadowEnabled(){
return m_bIsShadowEnabled; };
812 virtual int On_Click(DWORD nMouseKey, DWORD dwParam1, DWORD dwParam2);
815 virtual int On_Event(DWORD nEventType, DWORD dwParam1, DWORD dwParam2);
826 virtual int On_Net_Send(DWORD dwNetType, DWORD dwParam1, DWORD dwParam2);
830 virtual int On_Net_Receive(DWORD dwNetType, DWORD dwParam1, DWORD dwParam2);
839 virtual bool IsPhysicsEnabled();
845 void AnimateMoving(
double dTimeDelta,
bool bSharpTurning =
false);
853 asset_ptr<AssetEntity> m_pMultiAnimationEntity;
862 float m_fPhysicsRadius;
868 float m_fPhysicsHeight;
883 float m_fAccelerationDist;
889 float m_fSpeedVertical;
903 WayPointList_type m_vPosTarget;
908 float m_fFacingTarget;
914 float m_fLastBlockLight;
916 DWORD m_dwLastBlockHash;
938 float m_fAssetHeight;
943 DWORD m_dwPhysicsGroupSensorMask;
946 DWORD m_dwPhysicsGroupMask;
949 vector<IParaPhysicsActor*> m_staticActors;
951 DWORD m_dwPhysicsMethod;
952 uint32 m_nPhysicsGroup;
955 bool m_bIgnoreFacingTarget : 1;
956 bool m_bIsShadowEnabled : 1;
957 bool m_bIsAlwaysAboveTerrain : 1;
959 bool m_bPauseAnimation : 1;
961 bool m_ignoreSlopeCollision : 1;
964 bool m_isAlwaysFlying : 1;
965 bool m_isFlyUsingCameraDir : 1;
966 bool m_readyToLanding : 1;
967 bool m_bAutoWalkupBlock : 1;
969 bool m_bIsControlledExternally : 1;
970 bool m_bCanAnimOpacity : 1;
void WalkTo(const DVector3 &pV, bool bIgnoreHeight=true)
force the biped to walk to a position.
Definition: BipedObject.cpp:5131
virtual const char * GetAttributeClassDescription()
a static string, describing the attribute class object
Definition: BipedObject.h:120
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
bool HasAnimId(int nAnimID)
check to see if the underlying model has a given animation id.
Definition: BipedObject.cpp:4910
virtual int ProcessObjectEvent(const ObjectEvent &event)
this function is only used to backward compatibility of ParaObject:AddEvent() function.
Definition: BipedObject.cpp:4986
void PlayDeathDecayAnim()
TODO: may a movie track should be used.
Definition: BipedObject.cpp:4541
void SetHeadUpdownAngle(float fFacing)
set the facing of model's head.
Definition: BipedObject.cpp:4334
void SetStandingState()
add the standing state action to its action manager
Definition: BipedObject.cpp:4547
bool IsStandingIntentioned()
return true, if the biped is not only standing now, but also intends to remain standing for the next ...
Definition: BipedObject.cpp:522
bool DumpBVHAnimations()
dump BVH animations of the main character asset
Definition: BipedObject.cpp:5350
virtual void Cleanup()
clean up the object.
Definition: BipedObject.cpp:275
virtual int On_Event(DWORD nEventType, DWORD dwParam1, DWORD dwParam2)
TODO: Some game defined events, such as user attack, etc.
Definition: BipedObject.cpp:5310
RenderSelectionStyle
how to render a selected object
Definition: BipedObject.h:89
bool GetIsAnimPaused()
true to pause animation.
Definition: BipedObject.h:263
3-dimensional vector with double precision.
Definition: ParaDVector3.h:17
void ForceStop()
stop the biped by removing all of its targeting way points.
Definition: BipedObject.cpp:5156
OPC is the default for remote player agent.
Definition: BipedObject.h:85
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
virtual IGameObject * QueryIGameObject()
this may return NULL, if the object does not implement the IGameObject interface. ...
Definition: BipedObject.cpp:5281
virtual CAIBase * GetAIModule()
Get the AI module that is dynamically associated with this object.
Definition: BipedObject.cpp:300
virtual void GetOBB(CShapeOBB *obb)
get the oriented bounding box in world space.
Definition: BipedObject.cpp:5274
PhysicsMoveStyle
how the character reacts to physics in the MoveTowards() functions
Definition: BipedObject.h:71
void FacingTarget(const Vector3 *pV)
facing the target right away provided that the biped is not moving
Definition: BipedObject.cpp:4367
ShadowVolume is a structure for storing shadow volume geometries.
Definition: ShadowVolume.h:39
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
virtual AssetEntity * GetPrimaryAsset()
used as KEY for batch rendering
Definition: BipedObject.cpp:5209
event that can be passed to scene object
Definition: ObjectEvent.h:6
virtual bool HasAnimation(int nAnimID)
whether an animation id exist.
Definition: BipedObject.cpp:4629
CAnimInstanceBase * GetAnimInstance()
get the animation instance.
Definition: BipedObject.cpp:322
virtual float GetRoll()
get object roll: is facing the positive x axis, if yaw is 0.
Definition: BipedObject.cpp:4227
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: BipedObject.cpp:5508
virtual Matrix4 * GetAttachmentMatrix(Matrix4 &pOut, int nAttachmentID=0, int nRenderNumber=0)
Get the specified attachment matrix of the current model.
Definition: BipedObject.cpp:992
float GetAbsoluteSpeed()
get the magnitude of the current speed of the character.
Definition: BipedObject.cpp:4401
abstract class for all animation instance implementation.
Definition: AnimInstanceBase.h:66
virtual void PushParam()
Usually, this is used in canvas drawing.
Definition: BipedObject.cpp:891
virtual bool HasAlphaBlendedObjects()
return true if the object contains alpha blended render pass.
Definition: BipedObject.cpp:4639
virtual DWORD GetPhysicsGroupMask()
get groups Mask used to filter physics objects, default to 0xffffffff.
Definition: BipedObject.cpp:4686
virtual int GetAttributeClassID()
attribute class ID should be identical, unless one knows how overriding rules work.
Definition: BipedObject.h:116
bool FacingTowards(double dTimeDelta, float fTargetFacing)
fFacingTarget: it must be in the range [0, 2*pi]
Definition: BipedObject.cpp:4185
void SetBootHeight(float fBootHeight)
set boot height, default to 0.f meters.
Definition: BipedObject.cpp:4871
float GetMaxSpeed()
get the maximum speed of the character.
Definition: BipedObject.cpp:4413
virtual void UpdateGeometry()
update the local transform from size, roll, pitch, yaw, etc.
Definition: BipedObject.cpp:4262
float GetHeadTurningAngle()
get the head facing.It is relative to the model facing.
Definition: BipedObject.cpp:4325
void SetDensity(float fDensity)
body density.
Definition: BipedObject.cpp:4376
bool MoveTowards_Linear(double dTimeDelta, const DVector3 &vPosTarget)
move as an OPC.
Definition: BipedObject.cpp:1885
virtual void SetScaling(float s)
set the scale of the object.
Definition: BipedObject.cpp:4451
virtual TextureEntity * GetDefaultReplaceableTexture(int ReplaceableTextureID)
get the default replaceable texture by its ID.
Definition: BipedObject.cpp:4649
virtual float GetSizeScale()
Definition: BipedObject.cpp:4442
virtual IAttributeFields * GetChildAttributeObject(const std::string &sName)
get attribute by child object.
Definition: BipedObject.cpp:4944
virtual void Animate(double dTimeDelta, int nRenderNumber=0)
animate the model by a given delta time.
Definition: BipedObject.cpp:908
void SetAutoWalkupBlock(bool bAutoWalkup)
whether automatically walk up block that is 1 block high in front of us.
Definition: BipedObject.cpp:4816
different physics engine has different winding order.
Definition: EventBinding.h:32
bool CheckBlockWorld(DVector3 &vMovePos, Vector3 &vMinPos, Vector3 &vMaxPos, bool &bUseGlobalTerrainNorm, bool &bReachPos, Vector3 &vBipedFacing, float fDeltaTime)
vMovePos is new tentative position that the player is moving towards.
Definition: BipedObject.cpp:2875
bool FlyTowards(double dTimeDelta, const DVector3 &vPosTarget, float fStopDistance, bool *pIsSlidingWall)
Definition: BipedObject.cpp:3402
Biped way point: see CBipedObject::m_vPosTarget.
Definition: BipedWayPoint.h:6
void SetPhysicsRadius(float fR)
the biped is modeled as a cylinder or sphere during rough physics calculation.
Definition: BipedObject.cpp:4494
void SetWalkingState(const char *sName=NULL)
Walk using specified animation.
Definition: BipedObject.cpp:4518
virtual void AnimateBiped(double dTimeDelta, bool bSharpTurning=false)
animate biped according to its current waypoint lists and speed.
Definition: BipedObject.cpp:873
character animation instance: it includes both the animation and model display information.
Definition: CustomCharModelInstance.h:17
virtual Matrix4 * GetRenderMatrix(Matrix4 &pOut, int nRenderNumber=0)
get the world transformation matrix for the current object.
Definition: BipedObject.cpp:1081
bool IsBipedBlocked()
If the biped is currently blocked.
Definition: BipedObject.cpp:4534
float GetHeadUpdownAngle()
get the head facing.It is relative to the model facing.
Definition: BipedObject.cpp:4343
virtual int GetPhysicsGroup()
Get the physics group ID to which this object belongs to default to 0, must be smaller than 32...
Definition: BipedObject.cpp:4748
float GetLastSpeed()
this is not used, unless, speed acceleration is positive.
Definition: BipedObject.cpp:4797
virtual int On_Click(DWORD nMouseKey, DWORD dwParam1, DWORD dwParam2)
when the player clicked on this object.
Definition: BipedObject.cpp:5302
virtual int GetNumReplaceableTextures()
get the total number of replaceable textures, which is the largest replaceable texture ID...
Definition: BipedObject.cpp:4644
virtual void SetOnAssetLoaded(const char *sCallbackScript)
set the callback scipt whenever the primary asset is successfully loaded.
Definition: BipedObject.cpp:1196
void SetVerticalSpeed(float fSpeed)
Set the vertical speed of the character.
Definition: BipedObject.cpp:5195
The following shadow interface should be implemented for any shadow caster entity in the game engine...
Definition: ShadowVolume.h:27
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
virtual void SetSpeedScale(float dScale)
set the animation instance's speed to dScale times of its original speed
Definition: BipedObject.cpp:4432
virtual int On_Perception()
when other game objects of a different type entered the perceptive area of this object.
Definition: BipedObject.cpp:5318
just appear brighter without applying light effect and diffuse color is 1.
Definition: BipedObject.h:92
void SetIsAlwaysAboveTerrain(bool bEnable)
set whether character should always above terrain during movement.
Definition: BipedObject.h:256
float GetDensity()
get body density
Definition: BipedObject.cpp:4381
void OneObstaclePathFinding(CBaseObject *pSolid)
give a precise solution, in which the biped is guaranteed to be approaching the destination point...
Definition: BipedObject.cpp:678
virtual float GetScaling()
get scaling
Definition: BipedObject.cpp:4461
virtual int On_FrameMove()
called every frame move when this character is sentient.
Definition: BipedObject.cpp:5326
LightParams is a structure for which a shadow volume is built.
Definition: ShadowVolume.h:8
only care about the terrain(and model) height before its feet
Definition: BipedObject.h:76
virtual void SetYaw(float fFacing)
set model facing to the specified value.
Definition: BipedObject.cpp:4217
virtual const char * GetAttributeClassName()
a static string, describing the attribute class object's name
Definition: BipedObject.h:118
a yellow border around the biped.
Definition: BipedObject.h:94
virtual void EnableAnim(bool bAnimated)
whether animation is enabled.
Definition: BipedObject.cpp:5398
virtual CBipedStateManager * GetBipedStateManager(bool bCreateOnDemand=true)
get biped state manager
Definition: BipedObject.cpp:282
virtual int GetAnimFrame()
get the current animation frame number relative to the beginning of current animation.
Definition: BipedObject.cpp:5378
int GetStaticActorCount()
get the number of physics actors.
Definition: BipedObject.cpp:4772
void FallDown()
if the biped is in air, it will fall down.
Definition: BipedObject.cpp:5166
virtual int GetChildAttributeColumnCount()
we support multi-dimensional child object.
Definition: BipedObject.cpp:4981
PhysicsMoveStyle GetMovementStyle()
how the character reacts to physics in the MoveTowards() functions
Definition: BipedObject.h:276
MyType
Definition: BipedWayPoint.h:10
virtual void SetLocalTransform(const Matrix4 &mXForm)
set local transform directly
Definition: BipedObject.cpp:1006
void SetHeadTurningAngle(float fFacing)
set the facing of model's head.
Definition: BipedObject.cpp:4316
virtual bool HasAttachmentPoint(int nAttachmentID=0)
whether it has an attachment point
Definition: BipedObject.cpp:982
bool IsControlledExternally() const
we will not simulate or changing the character's animation, etc, since the biped is controlled extern...
Definition: BipedObject.cpp:4881
void GetSpeedDirection(Vector3 *pV)
get the direction vector according to speed angle of current biped.
Definition: BipedObject.cpp:4110
no physics are applied, and make the character above terrain.
Definition: BipedObject.h:78
weak reference ptr use in a class like this: weak_ptr<CRefCounted> p; e.g.
Definition: PERef.h:105
virtual bool ViewTouch()
this function is called, when the object is in view range.
Definition: BipedObject.cpp:1267
virtual void SetUserControl()
Desc: Specifies whether this instance of CBipedObject is controlled by the user or the program...
Definition: BipedObject.cpp:1565
virtual int GetChildAttributeObjectCount(int nColumnIndex=0)
get the number of child objects (row count) in the given column.
Definition: BipedObject.cpp:4968
virtual int GetTime()
get the current local time in case it is animated in milli seconds frames.
Definition: BipedObject.cpp:5414
void SetBlendingFactor(float fBlendingFactor)
set the blending factor between the current and blend animation.
Definition: BipedObject.cpp:4901
float GetAssetHeight()
get asset height.
Definition: BipedObject.cpp:4255
void UseSpeedFromAnimation(int nIndex)
use the speed defined in a specified animation by its animation index.
Definition: BipedObject.cpp:4572
The ref_ptr class template stores a pointer to a dynamically allocated (AssetEntity|CRefCounted|BaseA...
Definition: PERefPtr.h:13
bool GetIsAlwaysAboveTerrain()
get whether character should always above terrain during movement.
Definition: BipedObject.h:258
this is an interface class for game objects, such as NPC, OPC and players.
Definition: IGameObject.h:15
float GetBootHeight()
get boot height, default to 0.f meters.
Definition: BipedObject.cpp:4876
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
Definition: ParaXEntity.h:9
virtual void SetPosition(const DVector3 &v)
always bottom center of the bounding shape
Definition: BipedObject.cpp:1222
float GetVerticalSpeed()
get the vertical speed of the character.
Definition: BipedObject.cpp:5190
void RemoveWayPointByType(BipedWayPoint::MyType nType=BipedWayPoint::COMMAND_POINT)
remove all way points that matches a given type
Definition: BipedObject.cpp:505
virtual void Reset()
reset the object to its default settings.
Definition: BipedObject.cpp:4466
void SetPhysicsHeight(float fH)
the biped is modeled as a cylinder or sphere during rough physics calculation.
Definition: BipedObject.cpp:4504
float GetPhysicsHeight()
the biped is modeled as a cylinder or sphere during rough physics calculation.
Definition: BipedObject.cpp:4499
virtual int On_Net_Receive(DWORD dwNetType, DWORD dwParam1, DWORD dwParam2)
when the network module receives packages from the network and it is about a certain game object...
Definition: BipedObject.cpp:5342
void DeleteAnimInstance()
delete the animation instance associated with this model.
Definition: BipedObject.cpp:263
character will slide along the wall infinitely.
Definition: BipedObject.h:74
virtual void SetPrimaryTechniqueHandle(int nHandle)
Set a new render technique handle.
Definition: BipedObject.cpp:1208
A common interface for all classes implementing IAttributeFields By implementing this class's virtual...
Definition: IAttributeFields.h:59
void SetSpeed(float fSpeed)
set the magnitude of the current speed of the character.
Definition: BipedObject.cpp:4408
float GetSpeed()
get the magnitude of the current speed of the character.
Definition: BipedObject.cpp:4397
virtual float GetSpeedScale()
Definition: BipedObject.cpp:4423
just linear interpolate from current pos to target pos, without using any physics.
Definition: BipedObject.h:80
virtual int On_EnterSentientArea()
when other game objects of a different type entered the sentient area of this object.
Definition: BipedObject.cpp:5286
virtual void LoadPhysics()
load the physics objects.
Definition: BipedObject.cpp:4696
BipedWayPoint & GetLastWayPoint()
get the last way point.
Definition: BipedObject.cpp:484
virtual void SetPhysicsGroupMask(DWORD dwValue)
set groups Mask used to filter physics objects, default to 0xffffffff.
Definition: BipedObject.cpp:4787
virtual void SetAssetFileName(const std::string &sFilename)
set asset file name
Definition: BipedObject.cpp:5240
AABB with orientation by a matrix.
Definition: ShapeOBB.h:11
virtual void SetUseGlobalTime(bool bUseGlobalTime)
whether to use global time to sync animation.
Definition: BipedObject.cpp:176
virtual int On_Net_Send(DWORD dwNetType, DWORD dwParam1, DWORD dwParam2)
during the execution of this object, it may send various network commands to the server or client...
Definition: BipedObject.cpp:5334
base class for all AI objects
Definition: AIBase.h:9
virtual void UnloadPhysics()
load the physics object
Definition: BipedObject.cpp:4725
virtual int GetAnimation()
get the scaling.
Definition: BipedObject.cpp:4623
CBaseObject * GetPhysicsBBObj()
get a base object containing the bounding box of the physical biped.
Definition: BipedObject.cpp:4509
virtual float GetPitch()
get object pitch: is facing the positive x axis, if yaw is 0.
Definition: BipedObject.cpp:4241
void SetIsAnimPaused(bool bPaused)
true to pause animation.
Definition: BipedObject.h:261
virtual bool CanHasPhysics()
if the object may contain physics
Definition: BipedObject.cpp:4691
CharModelInstance * GetCharModelInstance()
get the character model instance.
Definition: BipedObject.cpp:362
bool IsAutoWalkupBlock()
whether automatically walk up block that is 1 block high in front of us.
Definition: BipedObject.cpp:4821
virtual void Rotate(float x, float y, float z)
Rotate the object.This only takes effects on objects having 3D orientation, such as static mesh and p...
Definition: BipedObject.cpp:4456
flashing the biped. Not implemented.
Definition: BipedObject.h:96
virtual void SetSizeScale(float dScale)
set the size of the object to dScale times of its original size.
Definition: BipedObject.cpp:4472
managing biped state
Definition: BipedStateManager.h:11
ParaXEntity * GetParaXEntity()
get parax asset entity if its type is ParaX model.
Definition: BipedObject.cpp:4777
bool MountOn(CBaseObject *pTarget, int nMountID=-1)
mount the current character on the target
Definition: BipedObject.cpp:5427
virtual void SetPhysicsGroup(int nGroup)
set the physics group ID to which this object belongs to default to 0, must be smaller than 32...
Definition: BipedObject.cpp:4738
float GetAccelerationDist()
when m_fSpeed is set, this acceleration is used on m_fLastSpeed, before it reach m_fSpeed.
Definition: BipedObject.cpp:4811
virtual HRESULT Draw(SceneState *sceneState)
Desc: Render this CBipedObject instance using the current animation frames.
Definition: BipedObject.cpp:1338
virtual void GetLocalTransform(Matrix4 *localTransform)
get local transform
Definition: BipedObject.cpp:1011
Defines the base class of all scene elements:CBaseObject for Parallel World Engine.
Definition: BaseObject.h:230
the player must arrive at this point, before proceeding to the next way point when in this mode...
Definition: BipedWayPoint.h:15
void ResetBaseModel(AssetEntity *assetCharBaseModel)
Reset base model.
Definition: BipedObject.cpp:5214
virtual std::string ToString(DWORD nMethod)
convert the object to an NPL string by which this object may be created or deleted.
Definition: BipedObject.cpp:195
void AnimateUserControl(double dTimeDelta)
Desc: Reads user input and update Tiny's state and animation accordingly.
Definition: BipedObject.cpp:1586
HRESULT InitObject(AssetEntity *pMAE)
Set the base character model.
Definition: BipedObject.cpp:382
void JumpUpward(float fVerticalSpeed, bool bJumpFromGround)
jump up.
Definition: BipedObject.cpp:5174
void UpdateSpeed(float fSpeed)
update the biped's speed.
Definition: BipedObject.cpp:4554
bool MoveTowards_OPC(double dTimeDelta, const DVector3 &vPosTarget, float fQuickMoveDistance=15.f)
move as an OPC.
Definition: BipedObject.cpp:1842
void ForceMove()
Command the biped to move using its current facing (orientation).
Definition: BipedObject.cpp:5142
void UpdateState(float fTimeDelta)
this function is only called by the AnimateBiped() to update states for active bipeds.
Definition: BipedObject.cpp:884
void AnimateIdle(double dTimeDelta)
Desc: Checks if Tiny has been idle for long enough.
Definition: BipedObject.cpp:1599
CAIBase * UseAIModule(const string &sAIType)
use a specified AI object.
Definition: BipedObject.cpp:305
bool MoveTowards(double dTimeDelta, const DVector3 &vPosTarget, float fStopDistance, bool *pIsSlidingWall=NULL)
Move the biped in the physical scene.move the biped towards the target using its current speed and fa...
Definition: BipedObject.cpp:1928
int GetCurrentAnimation()
get the ID of the current animation.
Definition: BipedObject.cpp:4608
void ReplaceAIModule(CAIBase *pNew)
replace the current AI module with a new one.
Definition: BipedObject.cpp:292
virtual bool SetReplaceableTexture(int ReplaceableTextureID, TextureEntity *pTextureEntity)
set the replaceable texture at the given index with a new texture.
Definition: BipedObject.cpp:4664
this is primary animation instance used for normal animated character or advanced customizable charac...
Definition: ParaXAnimInstance.h:13
void AnimateMoving(double dTimeDelta, bool bSharpTurning=false)
Desc: Here we try to figure out if we're moving and can keep moving, or if we're waiting / blocked an...
Definition: BipedObject.cpp:3914
void SetMovementStyle(PhysicsMoveStyle nValue)
how the character reacts to physics in the MoveTowards() functions
Definition: BipedObject.h:273
virtual void SetAnimFrame(int nFrame)
set the current animation frame number relative to the beginning of current animation.
Definition: BipedObject.cpp:5388
void SetSpeedAngle(float fSpeedAngle)
set the current speed angle.
Definition: BipedObject.cpp:4386
virtual void PathFinding(double dTimeDelta)
environment simulator call these functions
Definition: BipedObject.cpp:542
virtual void EnablePhysics(bool bEnable)
this function will turn on or off the physics of the object.
Definition: BipedObject.cpp:4753
virtual TextureEntity * GetReplaceableTexture(int ReplaceableTextureID)
get the current replaceable texture by its ID.
Definition: BipedObject.cpp:4654
void LoadStoredModel(int nModelSetID)
Load a stored model in data base by the model set ID.
Definition: BipedObject.cpp:5265
It can be used to represent biped object(like human, re spawning monsters) in the scene without inher...
Definition: BipedObject.h:60
virtual int On_LeaveSentientArea()
when no other game objects of different type is in the sentient area of this object.
Definition: BipedObject.cpp:5294
virtual void PopParam()
Usually, this is used in canvas drawing.
Definition: BipedObject.cpp:900
virtual void ChooseNewLocation(Vector3 *pV)
Desc: Determine a new location for this character to move to.
Definition: BipedObject.cpp:1574
Base class for managed asset entity in ParaEngine.
Definition: AssetEntity.h:25
void FacingTargetImmediately()
facing the target immediately.
Definition: BipedObject.cpp:4355
float GetSpeedAngle()
get the speed direction for physics.
Definition: BipedObject.cpp:4391
bool SetParamsFromAsset()
set params from asset when the asset is available (async asset loading)
Definition: BipedObject.cpp:1231
CParaXAnimInstance * GetParaXAnimInstance()
get the ParaX animation instance.
Definition: BipedObject.cpp:349
virtual float GetPhysicsRadius()
the biped is modeled as a cylinder or sphere during rough physics calculation.
Definition: BipedObject.cpp:4490
virtual bool IsUseGlobalTime()
whether to use global time to sync animation.
Definition: BipedObject.cpp:185
virtual void SetAnimation(int nAnimID)
Set the current animation id.
Definition: BipedObject.cpp:4618
float GetHeadFacing()
this is the same as GetFacing()+GetHeadTurningAngle();
Definition: BipedObject.cpp:4351
void PlayAnimation(DWORD nIndex, bool bUpdateSpeed=true, bool bAppend=false)
Plat a specified animation by its animation index.
Definition: BipedObject.cpp:4586