2 #include "IAttributeFields.h" 3 #include "IViewClippingObject.h" 4 #include "IRefObject.h" 6 #include "IObjectScriptingInterface.h" 9 #include "unordered_ref_array.h" 10 #include "EffectFileHandles.h" 11 #include "ObjectEvent.h" 92 OBJ_CUSTOM_RENDERER = 0x1 << 17,
175 _CameraThirdPerson=101,
176 _CameraFirstPerson=102,
237 typedef std::list<ObjectEvent> ObjectEventList_Type;
239 enum _SceneObjectType
242 ContainerObject = 0x1,
245 BipedObject = 0x1<<3,
246 SpriteObject = 0x1<<4,
251 MeshPhysicsObject = 0x1<<9,
252 DynamicObject = 0x1<<10,
253 ViewCullingObject = 0x1<<11,
254 MissileObject = 0x1<<12,
255 GameObject = 0x1<<13,
256 LightObject = 0x1<<14,
257 MiniSceneGraph = 0x1<<15,
259 ManagedLoader = 0x1<<17,
261 PortalNode = 0x1<<19,
262 AntiPortalNode = 0x1<<20,
265 virtual CBaseObject::_SceneObjectType GetType(){
return CBaseObject::BaseObject;};
269 Type_EnterSentientArea=0,
270 Type_LeaveSentientArea,
323 virtual std::string
ToString(DWORD nMethod);
359 ATTRIBUTE_METHOD1(
CBaseObject, GetID_s,
int*) { *p1 = cls->GetID();
return S_OK; }
361 ATTRIBUTE_METHOD1(
CBaseObject, IsGlobal_s,
bool*) {*p1 = cls->IsGlobal();
return S_OK;}
363 ATTRIBUTE_METHOD1(
CBaseObject, GetFacing_s,
float*) {*p1 = cls->GetFacing();
return S_OK;}
364 ATTRIBUTE_METHOD1(
CBaseObject, SetFacing_s,
float) {cls->SetFacing(p1);
return S_OK;}
366 ATTRIBUTE_METHOD1(
CBaseObject, GetYaw_s,
float*) { *p1 = cls->GetYaw();
return S_OK; }
367 ATTRIBUTE_METHOD1(
CBaseObject, SetYaw_s,
float) { cls->SetYaw(p1);
return S_OK; }
369 ATTRIBUTE_METHOD1(
CBaseObject, GetPitch_s,
float*) { *p1 = cls->GetPitch();
return S_OK; }
370 ATTRIBUTE_METHOD1(
CBaseObject, SetPitch_s,
float) { cls->SetPitch(p1);
return S_OK; }
372 ATTRIBUTE_METHOD1(
CBaseObject, GetRoll_s,
float*) { *p1 = cls->GetRoll();
return S_OK; }
373 ATTRIBUTE_METHOD1(
CBaseObject, SetRoll_s,
float) { cls->SetRoll(p1);
return S_OK; }
375 ATTRIBUTE_METHOD1(
CBaseObject, GetHeight_s,
float*) {*p1 = cls->GetHeight();
return S_OK;}
376 ATTRIBUTE_METHOD1(
CBaseObject, SetHeight_s,
float) {cls->SetHeight(p1);
return S_OK;}
378 ATTRIBUTE_METHOD1(
CBaseObject, GetWidth_s,
float*) {*p1 = cls->GetWidth();
return S_OK;}
379 ATTRIBUTE_METHOD1(
CBaseObject, SetWidth_s,
float) {cls->SetWidth(p1);
return S_OK;}
381 ATTRIBUTE_METHOD1(
CBaseObject, GetDepth_s,
float*) {*p1 = cls->GetDepth();
return S_OK;}
382 ATTRIBUTE_METHOD1(
CBaseObject, SetDepth_s,
float) {cls->SetDepth(p1);
return S_OK;}
384 ATTRIBUTE_METHOD1(
CBaseObject, GetRadius_s,
float*) {*p1 = cls->GetRadius();
return S_OK;}
385 ATTRIBUTE_METHOD1(
CBaseObject, SetRadius_s,
float) {cls->SetRadius(p1);
return S_OK;}
387 ATTRIBUTE_METHOD1(
CBaseObject, GetPosition_s,
DVector3*) { *p1 = cls->GetPosition();
return S_OK; }
388 ATTRIBUTE_METHOD1(
CBaseObject, SetPosition_s,
DVector3) { cls->SetPosition(p1);
return S_OK; }
390 ATTRIBUTE_METHOD1(
CBaseObject, GetAssetFileName_s,
const char**) { *p1 = cls->GetAssetFileName().c_str();
return S_OK; }
391 ATTRIBUTE_METHOD1(
CBaseObject, SetAssetFileName_s,
const char*) { cls->SetAssetFileName(p1);
return S_OK; }
393 ATTRIBUTE_METHOD1(
CBaseObject, GetTechHandle_s,
int*) {*p1 = cls->GetPrimaryTechniqueHandle();
return S_OK;}
394 ATTRIBUTE_METHOD1(
CBaseObject, SetTechHandle_s,
int) {cls->SetPrimaryTechniqueHandle(p1);
return S_OK;}
396 ATTRIBUTE_METHOD1(
CBaseObject, GetCtorPercentage_s,
float*) {*p1 = cls->GetCtorPercentage();
return S_OK;}
397 ATTRIBUTE_METHOD1(
CBaseObject, SetCtorPercentage_s,
float) {cls->SetCtorPercentage(p1);
return S_OK;}
399 ATTRIBUTE_METHOD1(
CBaseObject, GetHomeZone_s,
const char**) {*p1 = cls->GetHomeZoneName();
return S_OK;}
400 ATTRIBUTE_METHOD1(
CBaseObject, SetHomeZone_s,
const char*) {cls->SetHomeZoneName(p1);
return S_OK;}
402 ATTRIBUTE_METHOD1(
CBaseObject, GetShowBoundingBox_s,
bool*) {*p1 = cls->IsShowBoundingBox();
return S_OK;}
403 ATTRIBUTE_METHOD1(
CBaseObject, SetShowBoundingBox_s,
bool) {cls->ShowBoundingBox(p1);
return S_OK;}
405 ATTRIBUTE_METHOD1(
CBaseObject, GetPhysicsGroup_s,
int*) {*p1 = cls->GetPhysicsGroup();
return S_OK;}
406 ATTRIBUTE_METHOD1(
CBaseObject, SetPhysicsGroup_s,
int) {cls->SetPhysicsGroup(p1);
return S_OK;}
408 ATTRIBUTE_METHOD1(
CBaseObject, GetPhysicsGroupMask_s, DWORD*) {*p1 = cls->GetPhysicsGroupMask();
return S_OK;}
409 ATTRIBUTE_METHOD1(
CBaseObject, SetPhysicsGroupMask_s, DWORD) {cls->SetPhysicsGroupMask(p1);
return S_OK;}
411 ATTRIBUTE_METHOD1(
CBaseObject, GetSelectGroupIndex_s,
int*) {*p1 = cls->GetSelectGroupIndex();
return S_OK;}
412 ATTRIBUTE_METHOD1(
CBaseObject, SetSelectGroupIndex_s,
int) {cls->SetSelectGroupIndex(p1);
return S_OK;}
414 ATTRIBUTE_METHOD(
CBaseObject, Reset_s) {cls->Reset();
return S_OK;}
416 DEFINE_SCRIPT_EVENT_GET(
CBaseObject, OnAssetLoaded);
417 ATTRIBUTE_METHOD1(
CBaseObject, SetOnAssetLoaded_s,
const char*) {cls->SetOnAssetLoaded(p1);
return S_OK;}
419 ATTRIBUTE_METHOD1(
CBaseObject, GetRenderOrder_s,
float*) { *p1 = cls->GetRenderOrder();
return S_OK; }
420 ATTRIBUTE_METHOD1(
CBaseObject, SetRenderOrder_s,
float) { cls->SetRenderOrder(p1);
return S_OK; }
422 ATTRIBUTE_METHOD1(
CBaseObject, GetRenderImportance_s,
int*) { *p1 = cls->GetRenderImportance();
return S_OK; }
423 ATTRIBUTE_METHOD1(
CBaseObject, SetRenderImportance_s,
int) { cls->SetRenderImportance(p1);
return S_OK; }
425 ATTRIBUTE_METHOD1(
CBaseObject, GetRenderDistance_s,
float*) {*p1 = cls->GetRenderDistance();
return S_OK;}
426 ATTRIBUTE_METHOD1(
CBaseObject, SetRenderDistance_s,
float) {cls->SetRenderDistance(p1);
return S_OK;}
428 ATTRIBUTE_METHOD1(
CBaseObject, GetAnimation_s,
int*) {*p1 = cls->GetAnimation();
return S_OK;}
429 ATTRIBUTE_METHOD1(
CBaseObject, SetAnimation_s,
int) {cls->SetAnimation(p1);
return S_OK;}
431 ATTRIBUTE_METHOD1(
CBaseObject, GetAnimFrame_s,
int*) {*p1 = cls->GetAnimFrame();
return S_OK;}
432 ATTRIBUTE_METHOD1(
CBaseObject, SetAnimFrame_s,
int) {cls->SetAnimFrame(p1);
return S_OK;}
434 ATTRIBUTE_METHOD1(
CBaseObject, IsAnimEnabled_s,
bool*) { *p1 = cls->IsAnimEnabled();
return S_OK; }
435 ATTRIBUTE_METHOD1(
CBaseObject, EnableAnim_s,
bool) { cls->EnableAnim(p1);
return S_OK; }
437 ATTRIBUTE_METHOD1(
CBaseObject, IsUseGlobalTime_s,
bool*) {*p1 = cls->IsUseGlobalTime();
return S_OK;}
438 ATTRIBUTE_METHOD1(
CBaseObject, SetUseGlobalTime_s,
bool) {cls->SetUseGlobalTime(p1);
return S_OK;}
440 ATTRIBUTE_METHOD1(
CBaseObject, GetChildCount_s,
int*) {*p1 = (int)(cls->GetChildren().size());
return S_OK;}
442 ATTRIBUTE_METHOD1(
CBaseObject, GetNormal_s,
Vector3*) {*p1 = cls->GetNormal();
return S_OK;}
443 ATTRIBUTE_METHOD1(
CBaseObject, SetNormal_s,
Vector3) {cls->SetNormal(p1);
return S_OK;}
445 ATTRIBUTE_METHOD1(
CBaseObject, IsTransparent_s,
bool*) {*p1 = cls->IsTransparent();
return S_OK;}
446 ATTRIBUTE_METHOD1(
CBaseObject, SetTransparent_s,
bool) {cls->SetTransparent(p1);
return S_OK;}
448 ATTRIBUTE_METHOD1(
CBaseObject, IsVisible_s,
bool*) {*p1 = cls->IsVisible();
return S_OK;}
449 ATTRIBUTE_METHOD1(
CBaseObject, SetVisibility_s,
bool) {cls->SetVisibility(p1);
return S_OK;}
451 ATTRIBUTE_METHOD1(
CBaseObject, IsShadowCaster_s,
bool*) {*p1 = cls->IsShadowCaster();
return S_OK;}
452 ATTRIBUTE_METHOD1(
CBaseObject, SetShadowCaster_s,
bool) {cls->SetShadowCaster(p1);
return S_OK;}
454 ATTRIBUTE_METHOD1(
CBaseObject, IsShadowReceiver_s,
bool*) {*p1 = cls->IsShadowReceiver();
return S_OK;}
455 ATTRIBUTE_METHOD1(
CBaseObject, SetShadowReceiver_s,
bool) {cls->SetShadowReceiver(p1);
return S_OK;}
457 ATTRIBUTE_METHOD1(
CBaseObject, IsBillboarded_s,
bool*) {*p1 = cls->IsBillboarded();
return S_OK;}
458 ATTRIBUTE_METHOD1(
CBaseObject, SetBillboarded_s,
bool) {cls->SetBillboarded(p1);
return S_OK;}
460 ATTRIBUTE_METHOD1(
CBaseObject, IsSkipRender_s,
bool*) {*p1 = cls->IsSkipRender();
return S_OK;}
461 ATTRIBUTE_METHOD1(
CBaseObject, SetSkipRender_s,
bool) {cls->SetSkipRender(p1);
return S_OK;}
463 ATTRIBUTE_METHOD1(
CBaseObject, IsSkipPicking_s,
bool*) {*p1 = cls->IsSkipPicking();
return S_OK;}
464 ATTRIBUTE_METHOD1(
CBaseObject, SetSkipPicking_s,
bool) {cls->SetSkipPicking(p1);
return S_OK;}
466 ATTRIBUTE_METHOD1(
CBaseObject, IsSkipTerrainNormal_s,
bool*) {*p1 = cls->IsSkipTerrainNormal();
return S_OK;}
467 ATTRIBUTE_METHOD1(
CBaseObject, SetSkipTerrainNormal_s,
bool) {cls->SetSkipTerrainNormal(p1);
return S_OK;}
469 ATTRIBUTE_METHOD1(
CBaseObject, GetSelectionEffect_s,
int*) {*p1 = cls->GetSelectionEffect();
return S_OK;}
470 ATTRIBUTE_METHOD1(
CBaseObject, SetSelectionEffect_s,
int) {cls->SetSelectionEffect(p1);
return S_OK;}
472 ATTRIBUTE_METHOD1(
CBaseObject, IsHeadOnZEnabled_s,
bool*) {*p1 = cls->IsHeadOnZEnabled();
return S_OK;}
473 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOnZEnabled_s,
bool) {cls->SetHeadOnZEnabled(p1);
return S_OK;}
475 ATTRIBUTE_METHOD1(
CBaseObject, IsHeadOn3DScalingEnabled_s,
bool*) {*p1 = cls->IsHeadOn3DScalingEnabled();
return S_OK;}
476 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOn3DScalingEnabled_s,
bool) {cls->SetHeadOn3DScalingEnabled(p1);
return S_OK;}
478 ATTRIBUTE_METHOD1(
CBaseObject, IsHeadOnUseGlobal3DScaling_s,
bool*) {*p1 = cls->IsHeadOnUseGlobal3DScaling();
return S_OK;}
479 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOnUseGlobal3DScaling_s,
bool) {cls->SetHeadOnUseGlobal3DScaling(p1);
return S_OK;}
481 ATTRIBUTE_METHOD1(
CBaseObject, GetHeadOnNearZoomDist_s,
float*) {*p1 = cls->GetHeadOnNearZoomDist();
return S_OK;}
482 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOnNearZoomDist_s,
float) {cls->SetHeadOnNearZoomDist(p1);
return S_OK;}
484 ATTRIBUTE_METHOD1(
CBaseObject, GetHeadOnFarZoomDist_s,
float*) {*p1 = cls->GetHeadOnFarZoomDist();
return S_OK;}
485 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOnFarZoomDist_s,
float) {cls->SetHeadOnFarZoomDist(p1);
return S_OK;}
487 ATTRIBUTE_METHOD1(
CBaseObject, GetHeadOnMinUIScaling_s,
float*) {*p1 = cls->GetHeadOnMinUIScaling();
return S_OK;}
488 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOnMinUIScaling_s,
float) {cls->SetHeadOnMinUIScaling(p1);
return S_OK;}
490 ATTRIBUTE_METHOD1(
CBaseObject, GetHeadOnMaxUIScaling_s,
float*) {*p1 = cls->GetHeadOnMaxUIScaling();
return S_OK;}
491 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOnMaxUIScaling_s,
float) {cls->SetHeadOnMaxUIScaling(p1);
return S_OK;}
493 ATTRIBUTE_METHOD1(
CBaseObject, GetHeadOnAlphaFadePercentage_s,
float*) {*p1 = cls->GetHeadOnAlphaFadePercentage();
return S_OK;}
494 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOnAlphaFadePercentage_s,
float) {cls->SetHeadOnAlphaFadePercentage(p1);
return S_OK;}
496 ATTRIBUTE_METHOD1(
CBaseObject, GetHeadOn3DFacing_s,
float*) {*p1 = cls->GetHeadOn3DFacing();
return S_OK;}
497 ATTRIBUTE_METHOD1(
CBaseObject, SetHeadOn3DFacing_s,
float) {cls->SetHeadOn3DFacing(p1);
return S_OK;}
499 ATTRIBUTE_METHOD1(
CBaseObject, IsPersistent_s,
bool*) {*p1 = cls->IsPersistent();
return S_OK;}
500 ATTRIBUTE_METHOD1(
CBaseObject, SetPersistent_s,
bool) {cls->SetPersistent(p1);
return S_OK;}
502 ATTRIBUTE_METHOD1(
CBaseObject, IsDead_s,
bool*) { *p1 = cls->IsDead();
return S_OK; }
503 ATTRIBUTE_METHOD1(
CBaseObject, SetDead_s,
bool) { cls->SetDead();
return S_OK; }
505 ATTRIBUTE_METHOD1(
CBaseObject, IsTileObject_s,
bool*) { *p1 = cls->IsTileObject();
return S_OK; }
506 ATTRIBUTE_METHOD1(
CBaseObject, SetTileObject_s,
bool) { cls->SetTileObject(p1);
return S_OK; }
508 ATTRIBUTE_METHOD1(
CBaseObject, GetFrameNumber_s,
int*) { *p1 = cls->GetFrameNumber();
return S_OK; }
509 ATTRIBUTE_METHOD1(
CBaseObject, SetFrameNumber_s,
int) { cls->SetFrameNumber(p1);
return S_OK; }
511 ATTRIBUTE_METHOD1(
CBaseObject, GetOpacity_s,
float*) { *p1 = cls->GetOpacity();
return S_OK; }
512 ATTRIBUTE_METHOD1(
CBaseObject, SetOpacity_s,
float) { cls->SetOpacity(p1);
return S_OK; }
514 ATTRIBUTE_METHOD1(
CBaseObject, IsLastFrameRendered_s,
bool*) { *p1 = cls->IsLastFrameRendered();
return S_OK; }
515 ATTRIBUTE_METHOD(
CBaseObject, DestroyChildren_s) { cls->DestroyChildren();
return S_OK; }
517 ATTRIBUTE_METHOD1(
CBaseObject, GetRenderMatrix_s,
Matrix4*) { cls->GetRenderMatrix(*p1);
return S_OK; }
519 ATTRIBUTE_METHOD1(
CBaseObject, SetLocalTransform_s,
const Matrix4&) { cls->SetLocalTransform(p1);
return S_OK; }
520 ATTRIBUTE_METHOD1(
CBaseObject, GetLocalTransform_s,
Matrix4*) { cls->GetLocalTransform(p1);
return S_OK; }
522 ATTRIBUTE_METHOD1(
CBaseObject, IsPhysicsEnabled_s,
bool*) { *p1 = cls->IsPhysicsEnabled();
return S_OK; }
523 ATTRIBUTE_METHOD1(
CBaseObject, EnablePhysics_s,
bool) { cls->EnablePhysics(p1);
return S_OK; }
525 ATTRIBUTE_METHOD1(
CBaseObject, IsLODEnabled_s,
bool*) { *p1 = cls->IsLODEnabled();
return S_OK; }
526 ATTRIBUTE_METHOD1(
CBaseObject, EnableLOD_s,
bool) { cls->EnableLOD(p1);
return S_OK; }
710 virtual bool IsPhysicsEnabled();
734 void SetRenderOrder(
float val);
779 bool ActivateScript(
int func_type,
const string& precode,
const string& postcode);
792 virtual void SetBoundingBox(
float fOBB_X,
float fOBB_Y,
float fOBB_Z,
float fFacing);
797 virtual void GetBoundingBox(
float* fOBB_X,
float* fOBB_Y,
float* fOBB_Z,
float* fFacing);
806 virtual void SetBoundRect(
float fWidth ,
float fHeight,
float fFacing);
810 virtual void GetBoundRect(
float* fWidth ,
float* fHeight,
float* fFacing);
842 virtual void SetOpacity(
float fOpacity);
843 virtual float GetOpacity();
845 virtual HRESULT InitDeviceObjects();
846 virtual HRESULT RestoreDeviceObjects();
847 virtual HRESULT InvalidateDeviceObjects();
848 virtual HRESULT DeleteDeviceObjects();
849 virtual HRESULT RendererRecreated();
854 virtual void SetRenderDistance(
float fDist);
935 virtual void OnSelect(
int nGroupID);
954 virtual void SetDead();
967 virtual void Animate(
double dTimeDelta,
int nRenderNumber=0 );
1045 virtual bool IsAnimEnabled() {
return true; };
1075 virtual void SetHeight(
float fHeight);
1079 virtual void SetWidth(
float fWidth);
1083 virtual void SetDepth(
float fDepth);
1087 virtual void SetNormal(
const Vector3 & pNorm){};
1120 virtual bool IsStanding(){
return true;};
1135 virtual void Report( vector < string > & v_sReport );
1136 virtual HRESULT ResetTime();
1143 enum CompressOption{
1153 virtual void CompressObject(CompressOption option = (CompressOption)0xffff);
1166 void SetFrameNumber(
int nFrameNumber);
1206 const char* GetHomeZoneName();
1220 virtual void SetTileObject(
bool bIsTileObject);
1225 void SetGeometryDirty(
bool bDirty =
true);
1229 void EnableLOD(
bool val);
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
virtual bool SetReplaceableTexture(int ReplaceableTextureID, TextureEntity *pTextureEntity)
set the replaceable texture at the given index with a new texture.
Definition: BaseObject.cpp:741
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: BaseObject.cpp:1128
void SetSelectGroupIndex(int nGroupIndex=-1)
set the selection group index.
Definition: BaseObject.cpp:59
bool m_bEnableLOD
whether to enable lod if there is lod.
Definition: BaseObject.h:1295
Update the object in NPL, which is delete the object first, then create it again. this is useful to u...
Definition: BaseObject.h:290
virtual bool HasAlphaBlendedObjects()
return true if the object contains alpha blended render pass.
Definition: BaseObject.cpp:926
virtual void SetObjectShape(ObjectShape shape)
set the object shape
Definition: BaseObject.cpp:400
bool IsSkipPicking()
get whether object should be excluded from picking.
Definition: BaseObject.h:673
virtual int GetAnimFrame()
get the current animation frame number relative to the beginning of current animation.
Definition: BaseObject.h:1041
float m_fRenderDistance
we will not render this object if the object's position to camera eye position is further than this v...
Definition: BaseObject.h:1287
virtual void OnSelect(int nGroupID)
called when an object is selected.
Definition: BaseObject.cpp:464
this is a very big and non-movable object.
Definition: BaseObject.h:80
virtual bool HasAttachmentPoint(int nAttachmentID=0)
whether it has an attachment point
Definition: BaseObject.cpp:655
3-dimensional vector with double precision.
Definition: ParaDVector3.h:17
int32 m_nTechniqueHandle
the primary technique handle
Definition: BaseObject.h:1260
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
virtual void SetPosition(const DVector3 &v)
always bottom center of the bounding shape
Definition: BaseObject.cpp:942
virtual void SetPrimaryTechniqueHandle(int nHandle)
Set a new render technique handle.
Definition: BaseObject.cpp:430
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
virtual float GetRadius()
Definition: BaseObject.cpp:272
delete the object in NPL
Definition: BaseObject.h:292
all child objects are in this object's volume
Definition: BaseObject.h:47
virtual void SetLocalTransform(const Matrix4 &mXForm)
set local transform directly
Definition: BaseObject.cpp:1076
create the object in NPL
Definition: BaseObject.h:286
two solid objects with sensor volume will cause environment simulator to to generate sensor/collision...
Definition: BaseObject.h:45
int RemoveChildByName(const string &name, bool bRecursive=false)
remove a child by name but it does not destroy it.
Definition: BaseObject.cpp:560
virtual bool IsPersistent()
whether the object is persistent in the world.
Definition: BaseObject.cpp:835
bool IsGeometryDirty() const
whether the shape of the object is dirty, such as model, size, facing, local transform is changed...
Definition: BaseObject.h:1224
Pure interface for CBaseObject (3D scene object) It defines basic shapes and collision detection...
Definition: IViewClippingObject.h:29
DWORD m_dwAttribute
volume type and attribute of this object.
Definition: BaseObject.h:1247
Controllable only through LLE(commands) from the network.
Definition: BaseObject.h:166
virtual void SetAlwaysLoadPhysics(bool bEnable)
by default physics is lazy-load when player walk into its bounding box, setting this to false will al...
Definition: BaseObject.cpp:766
virtual void EnableAnim(bool bAnimated)
whether animation is enabled.
Definition: BaseObject.h:1044
CChildObjectList_Type m_children
child objects array: we keep strong references (ref counted) to child objects
Definition: BaseObject.h:1250
virtual void SetUseGlobalTime(bool bUseGlobalTime)
whether to use global time to sync animation.
Definition: BaseObject.h:1052
virtual void Reset()
reset the object to its default settings.
Definition: BaseObject.h:1065
whether to suppress the asset creation code.
Definition: BaseObject.h:294
bool CheckVolumnField(DWORD volType)
Use CheckAttribute()
Definition: BaseObject.h:546
virtual bool AddChildAttributeObject(IAttributeFields *pChild, int nRowIndex=-1, int nColumnIndex=0)
add child object.
Definition: BaseObject.cpp:1081
whether lights have effects on this object.
Definition: BaseObject.h:67
animated mesh object that DOES collide with other object, such as wall and trees. ...
Definition: BaseObject.h:157
int GetID()
the ID of the object.
Definition: BaseObject.cpp:79
bool IsBillboarded()
if the model asset file name ended with "_b" it will be treated as billboarded.
Definition: BaseObject.h:580
virtual int GetAttributeClassID()
attribute class ID should be identical, unless one knows how overriding rules work.
Definition: BaseObject.h:338
void SetVisibility(bool bVisible)
set the visibility of this object.
Definition: BaseObject.cpp:380
virtual AssetEntity * GetPrimaryAsset()
Set scaling.
Definition: BaseObject.h:1112
int32 m_nFrameNumber
the frame number that this object is last accessed.
Definition: BaseObject.h:1263
void SetVegetation(bool bIsVegetation)
whether to render this mesh using the vegetation shader
Definition: BaseObject.h:615
virtual const std::string & GetAssetFileName()
get asset file name
Definition: BaseObject.cpp:307
virtual void * QueryObjectByName(const std::string &sObjectType)
convert to object of a given type.
Definition: BaseObject.cpp:1095
a yellow border around the biped.
Definition: BaseObject.h:185
bool IsLODEnabled() const
whether to enable lod if there is lod.
Definition: BaseObject.cpp:899
virtual void SetPhysicsGroupMask(DWORD dwValue)
set groups Mask used to filter physics objects, default to 0xffffffff
Definition: BaseObject.cpp:826
different physics engine has different winding order.
Definition: EventBinding.h:32
CZoneNode * GetHomeZone()
get the home zone of this object if any.
Definition: BaseObject.cpp:687
virtual void SetTransparent(bool bIsTransparent)
Set whether the object is transparent.
Definition: BaseObject.h:891
int GetFrameNumber()
get the frame number that this object is last accessed.
Definition: BaseObject.cpp:845
bool IsVegetation()
whether to render this mesh using the vegetation shader
Definition: BaseObject.h:621
virtual int GetPhysicsGroup()
Get the physics group ID to which this object belongs to default to 0, must be smaller than 32...
Definition: BaseObject.h:1020
bool IsVisible()
invisible object will not be drawn.
Definition: BaseObject.cpp:390
virtual ObjectShape GetObjectShape()
get the object shape
Definition: BaseObject.cpp:395
virtual void PushParam()
Usually, this is used in canvas drawing.
Definition: BaseObject.cpp:358
void SetAttribute(DWORD dwAtt, bool bTurnOn=true)
enable or disable a given attribute.
Definition: BaseObject.h:563
virtual int GetChildAttributeColumnCount()
we support multi-dimensional child object.
Definition: BaseObject.cpp:962
virtual void CompressObject(CompressOption option=(CompressOption) 0xffff)
Compress the object to save memory.
Definition: BaseObject.cpp:241
OBJECT_ATTRIBUTE
object volume bit fields here is some example: scene root: OBJ_VOLUMN_ISOLATED | OBJ_VOLUMN_FREESPAC...
Definition: BaseObject.h:41
virtual void SetCtorPercentage(float fPercentage)
Set the object construction percentage (progress) in the range[0,1].
Definition: BaseObject.h:1127
whether it is not a shadow caster.
Definition: BaseObject.h:73
virtual void UnloadPhysics()
load the physics object
Definition: BaseObject.cpp:375
virtual DWORD GetPhysicsGroupMask()
get groups Mask used to filter physics objects, default to 0xffffffff
Definition: BaseObject.cpp:830
portal rendering object
Definition: BaseObject.h:124
virtual void UpdateFrameNumber(int nFrameNumber)
this function is called to update the render frame number of this object.
Definition: BaseObject.cpp:726
virtual int GetSelectionEffect()
get the render effect when character is in selected state.
Definition: BaseObject.cpp:796
virtual void GetLocalTransform(Matrix4 *localTransform)
get local transform
Definition: BaseObject.cpp:1017
extensions for HAPI creation, main terrain mesh(can be very large)
Definition: BaseObject.h:119
virtual void SetAnimFrame(int nFrame)
set the current animation frame number relative to the beginning of current animation.
Definition: BaseObject.h:1038
this object is should be skipped early during render queue building.
Definition: BaseObject.h:84
virtual void DestroyChildren()
Completely destroy child nodes from memory recursively.
Definition: BaseObject.cpp:233
virtual CParameterBlock * GetEffectParamBlock(bool bCreateIfNotExist=false)
get effect parameter block with this object.
Definition: BaseObject.cpp:636
whether it is a vegetation.
Definition: BaseObject.h:75
virtual std::string ToString(DWORD nMethod)
convert the object to an NPL string by which this object may be created or deleted.
Definition: BaseObject.cpp:201
virtual void SetBoundingBox(float fOBB_X, float fOBB_Y, float fOBB_Z, float fFacing)
Set the object shape to box and bounding box parameters if fFacing is 0, it is a axis aligned boundin...
Definition: BaseObject.cpp:245
virtual bool IsGlobal()
whether this object is global.
Definition: BaseObject.cpp:105
virtual TextureEntity * GetDefaultReplaceableTexture(int ReplaceableTextureID)
get the default replaceable texture by its ID.
Definition: BaseObject.cpp:756
virtual void * QueryObject(int nObjectType)
convert to object of a given type.
Definition: BaseObject.cpp:1103
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
solid objects(like biped) can be placed on its volume, provided it's not already occupied by any soli...
Definition: BaseObject.h:51
bool IsRenderable()
whether this object can be rendered.
Definition: BaseObject.h:652
virtual bool ViewTouch()
this function is called, when the object is in view range.
Definition: BaseObject.cpp:776
whether show bounding box.
Definition: BaseObject.h:77
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: BaseObject.h:1011
void SetHomeZone(CZoneNode *pZone)
set the home zone of this object if any.
Definition: BaseObject.cpp:695
ObjectShape
object shape
Definition: IViewClippingObject.h:13
Definition: BaseCamera.h:70
bool IsShadowReceiver()
if the model asset file name ended with "_r" it will be treated as shadow receiver.
Definition: BaseObject.h:595
virtual CBipedStateManager * GetBipedStateManager(bool bCreateOnDemand=true)
get biped state manager
Definition: BaseObject.h:1003
void SnapToTerrainSurface(bool bUseNorm=true)
call this function to reset the y component and norm of the object to the global terrain surface at (...
Definition: BaseObject.cpp:332
float m_fRenderOrder
0 if automatic, larger number renders after smaller numbered object.
Definition: BaseObject.h:1283
int32 m_nSelectGroupIndex
this is the selection group index.
Definition: BaseObject.h:1266
virtual void GetBoundRect(float *fWidth, float *fHeight, float *fFacing)
Definition: BaseObject.cpp:261
void ShowBoundingBox(bool bShowBoundingBox)
set whether to show bounding box for this object.
Definition: BaseObject.h:628
virtual bool IsTileObject()
if true, we will attach this object to quad-tree terrain tile according to its attributes when adding...
Definition: BaseObject.cpp:69
int GetSelectGroupIndex()
get the selection group index.
Definition: BaseObject.cpp:64
bool IsShadowCaster()
Definition: BaseObject.h:610
void SetRenderImportance(int nRenderImportance)
the larger, the more important.
Definition: BaseObject.h:721
virtual TextureEntity * GetReplaceableTexture(int ReplaceableTextureID)
get the current replaceable texture by its ID.
Definition: BaseObject.cpp:746
virtual float GetPhysicsRadius()
get the radius for physics simulation.
Definition: BaseObject.cpp:276
virtual Vector3 * GetAttachmentPosition(Vector3 &pOut, int nAttachmentID=0, int nRenderNumber=0)
whether it has an attachment point
Definition: BaseObject.cpp:661
a zone in portal rendering.
Definition: ZoneNode.h:17
CParameterBlock * m_pEffectParamBlock
effect param block that should be applied to m_nTechniqueHandle
Definition: BaseObject.h:1290
virtual bool CanHasPhysics()
if the object may contain physics
Definition: BaseObject.cpp:811
virtual void LoadPhysics()
load the physics objects.
Definition: BaseObject.cpp:370
void SetHomeZoneName(const char *sName)
set the home zone name.
Definition: BaseObject.cpp:710
void SetSkipRender(bool bSkipRender)
set whether object should be excluded from the skip render
Definition: BaseObject.h:658
int DestroyChildByName(const string &name, bool bRecursive=false)
destroy a child by name.
Definition: BaseObject.cpp:522
objects with this VIP volume type will trigger the plot of the scene in its view-culling radius...
Definition: BaseObject.h:61
this is an interface class for game objects, such as NPC, OPC and players.
Definition: IGameObject.h:15
virtual HRESULT Draw(SceneState *sceneState)
only for drawable objects
Definition: BaseObject.cpp:351
virtual bool IsTransparent()
whether the object contains transparent material.
Definition: BaseObject.h:885
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
virtual void PopParam()
Usually, this is used in canvas drawing.
Definition: BaseObject.cpp:364
solid mesh such as simple houses, stone, etc
Definition: BaseObject.h:138
a tile in the latticed terrain class
Definition: TerrainTile.h:21
virtual void SetOnAssetLoaded(const char *sCallbackScript)
set the callback script whenever the primary asset is successfully loaded.
Definition: BaseObject.cpp:91
bool CheckFrameNumber(int nFrameNumber)
call this function whenever a render may render this object.
Definition: BaseObject.cpp:731
mask of the above bits.
Definition: BaseObject.h:65
CBaseObject * GetChildByName(const string &name, bool bRecursive=false)
get child by name: it may return NULL if the child does not exist.
Definition: BaseObject.cpp:490
virtual void SetParent(CBaseObject *pParent)
this function is called by parent class to set the child's parent.
Definition: BaseObject.h:945
virtual float GetRenderDistance()
we will not render this object if the object's position to camera eye position is further than this v...
Definition: BaseObject.cpp:791
int32 m_nRenderImportance
the larger, the more important.
Definition: BaseObject.h:1272
virtual void SetAssetFileName(const std::string &sFilename)
set asset file name
Definition: BaseObject.cpp:316
if this bit is on, the object's physics data is read from the mesh entity (i.e.
Definition: BaseObject.h:106
create the object in managed loader in NPL
Definition: BaseObject.h:288
int m_nID
the ID of the object.
Definition: BaseObject.h:1244
bool IsShowBoundingBox()
get whether to show bounding box for this object.
Definition: BaseObject.h:634
virtual int GetMeshTriangleList(std::vector< Vector3 > &output, int nOption=0)
return triangle list
Definition: BaseObject.cpp:1025
A common interface for all classes implementing IAttributeFields By implementing this class's virtual...
Definition: IAttributeFields.h:59
CallBackType
call back type
Definition: BaseObject.h:268
virtual float GetDepth()
get object depth: z axis
Definition: BaseObject.cpp:298
CTerrainTile * GetTileContainer()
get the quad-tree terrain tile that this game object is currently visiting.
Definition: BaseObject.cpp:409
virtual void UpdateTileContainer()
update the tile container according to the current position of the game object.
Definition: BaseObject.cpp:419
virtual void UpdateGeometry()
this function is usually called after asset file has changed.
Definition: BaseObject.cpp:1071
virtual IAttributeFields * GetChildAttributeObject(const std::string &sName)
get attribute by child object.
Definition: BaseObject.cpp:888
virtual const char * GetAttributeClassDescription()
a static string, describing the attribute class object
Definition: BaseObject.h:342
animated mesh object that does not collide with any object, such as bird and grass ...
Definition: BaseObject.h:155
bool IsSkipTerrainNormal()
if specified, this character will always be perpendicular to the ground, regardless to the terrain no...
Definition: BaseObject.cpp:821
virtual int GetNumReplaceableTextures()
get the total number of replaceable textures, which is the largest replaceable texture ID...
Definition: BaseObject.cpp:751
bool IsSkipRender()
get whether object should be excluded from the render queue.
Definition: BaseObject.h:663
PHYSICS_METHOD
how physics is implemented in this object.
Definition: BaseObject.h:96
above this value must be drawn
Definition: BaseObject.h:129
virtual Matrix4 * GetAttachmentMatrix(Matrix4 &pOut, int nAttachmentID=0, int nRenderNumber=0)
Get the specified attachment matrix of the current model.
Definition: BaseObject.cpp:650
virtual void SetSelectionEffect(int nStyle)
get the render effect when character is in selected state.
Definition: BaseObject.cpp:801
void SetSkipPicking(bool bSkipPicking)
set whether object should be excluded from picking
Definition: BaseObject.h:668
CCameraObject.
Definition: BaseObject.h:174
virtual void SetAnimation(int nAnimID)
Set the current animation id.
Definition: BaseObject.h:1024
void SetShadowReceiver(bool bEnable)
Definition: BaseObject.h:587
this object should be skipped in all picking functions.
Definition: BaseObject.h:87
below are all Neuron objects
Definition: BaseObject.h:160
virtual void SetBoundRect(float fWidth, float fHeight, float fFacing)
Set the object shape to rect (a plane) and rect parameters if fFacing is 0, it is a axis aligned boun...
Definition: BaseObject.cpp:257
above this value are all global bipeds, as apposed to regional biped
Definition: BaseObject.h:163
load physics when this object is created.
Definition: BaseObject.h:101
virtual void GetBoundingBox(float *fOBB_X, float *fOBB_Y, float *fOBB_Z, float *fFacing)
Definition: BaseObject.cpp:249
virtual void Cleanup()
clean up the object.
Definition: BaseObject.h:961
void SetBillboarded(bool bBillboarded)
Definition: BaseObject.h:573
virtual int GetChildAttributeObjectCount(int nColumnIndex=0)
get the number of child objects (row count) in the given column.
Definition: BaseObject.cpp:921
bool CanPick()
get whether object can be picked by mouse picking.
Definition: BaseObject.cpp:806
this object has no physics.
Definition: BaseObject.h:103
if specified, this character will always be perpendicular to the ground, regardless to the terrain no...
Definition: BaseObject.h:90
ObjectType m_objType
type of the object
Definition: BaseObject.h:1253
static int g_nObjectSelectionEffect
enum of RenderSelectionStyle
Definition: BaseObject.h:1297
virtual const char * GetAttributeClassName()
a static string, describing the attribute class object's name
Definition: BaseObject.h:340
mini scene graph
Definition: BaseObject.h:142
virtual IGameObject * QueryIGameObject()
this may return NULL, if the object does not implement the IGameObject interface. ...
Definition: BaseObject.cpp:404
RenderSelectionStyle
how to render a selected object
Definition: BaseObject.h:180
managing biped state
Definition: BipedStateManager.h:11
virtual CBaseObject * Clone()
Clone the object's contains and return a pointer to the newly created object.
Definition: BaseObject.cpp:1121
Definition: IObjectScriptingInterface.h:6
virtual void Animate(double dTimeDelta, int nRenderNumber=0)
animate the model by a given delta time.
Definition: BaseObject.cpp:211
virtual float GetHeight()
get object height y axis: only for object that has a Height property, usually is height of the boundi...
Definition: BaseObject.cpp:280
only load physics when a dynamic physics object enters its bounding box.
Definition: BaseObject.h:99
void SetShadowCaster(bool bEnable)
set whether it is shadow caster.
Definition: BaseObject.h:603
virtual bool IsDead()
whether this object should be removed some time in the future.
Definition: BaseObject.cpp:952
float GetRenderOrder() const
0 if automatic, larger number renders after smaller numbered object.
Definition: BaseObject.h:733
Defines the base class of all scene elements:CBaseObject for Parallel World Engine.
Definition: BaseObject.h:230
Dummy mesh that does not collide with any object, such as grass,etc.
Definition: BaseObject.h:140
virtual void SetRadius(float fRadius)
Set the object shape to Sphere and sphere parameters.
Definition: BaseObject.cpp:268
Object invisible, the object is not drawn.but its physics may load. added by lxz 2006.3.5.
Definition: BaseObject.h:63
virtual int PrepareRender(CBaseCamera *pCamera, SceneState *sceneState)
derived class can override this function to place the object in to the render pipeline.
Definition: BaseObject.cpp:931
void SetMyType(ObjectType t)
set the type of the object, it tells what this object is used for.
Definition: BaseObject.cpp:159
virtual float GetCtorPercentage()
Get the object construction percentage (progress) in the range[0,1].
Definition: BaseObject.h:1124
ObjectType
type of the scene objects
Definition: BaseObject.h:112
NPL_STRING
by which method an object is converted to NPL string.
Definition: BaseObject.h:284
CBaseObject.
Definition: BaseObject.h:116
virtual void AddToDeadObjectPool()
When a child object wants to remove itself, it is usually not safe to do so immediately, instead the object add itself to dead object pool for the root scene to safely remove it at the end of the frame.
Definition: BaseObject.cpp:957
just appear brighter without applying light effect and diffuse color is 1.
Definition: BaseObject.h:183
virtual float GetWidth()
get object width: x axis
Definition: BaseObject.cpp:289
extensions for HAPI creation, added 2004-4-30 by LiXizhi
Definition: BaseObject.h:134
extensions for HAPI creation, added 2004-5-20 by LiXizhi
Definition: BaseObject.h:136
Some 3d object may contain some head on display objects.
Definition: IHeadOn3D.h:84
the object has a perceptive radius that may be larger than the object's collision radius...
Definition: BaseObject.h:59
whether the object is isolated from its siblings.
Definition: BaseObject.h:56
CChildObjectList_Type & GetChildren()
– Base object functions
Definition: BaseObject.h:737
static CBaseObject * GetObjectByID(int nID)
GetObject By ID.
Definition: BaseObject.cpp:96
whether to rotate the object around Y axis to let the object always facing the camera.
Definition: BaseObject.h:69
whether it is a shadow receiver.
Definition: BaseObject.h:71
bool m_bGeometryDirty
whether the shape of the object is dirty, such as model, size, facing, local transform is changed...
Definition: BaseObject.h:1293
below are types of animation object that at least derived from CBipedObject and is animatable...
Definition: BaseObject.h:153
virtual int GetPrimaryTechniqueHandle()
when batch-rendering a group of objects, objects are usually sorted by their render techniques and th...
Definition: BaseObject.cpp:425
virtual void AutoSelectTechnique()
automatically select the proper technique for the rendering of the object.
Definition: BaseObject.cpp:435
virtual void AddChild(CBaseObject *pObject)
add another object as the child of this object
Definition: BaseObject.cpp:215
void SetSkipTerrainNormal(bool bSkip)
if specified, this character will always be perpendicular to the ground, regardless to the terrain no...
Definition: BaseObject.cpp:816
virtual void SetPersistent(bool bPersistent)
whenever a persistent object is made non-persistent, the SaveToDB() function will actually removed it...
Definition: BaseObject.cpp:840
virtual IViewClippingObject * GetViewClippingObject()
return the view clipping object used for object-level clipping when rendering this object...
Definition: BaseObject.cpp:850
virtual void OnDeSelect()
called whenever an object is un-selected.
Definition: BaseObject.cpp:476
virtual void EnablePhysics(bool bEnable)
this function will turn on or off the physics of the object.
Definition: BaseObject.cpp:761
int RemoveChild(const CBaseObject *pObj, bool bRecursive=false)
remove a child by pointer but it does not destroy it.
Definition: BaseObject.cpp:598
Base class for managed asset entity in ParaEngine.
Definition: AssetEntity.h:25
bool IsLastFrameRendered()
check to see if the last frame is rendered.
Definition: BaseObject.cpp:857
bool CheckAttribute(DWORD attribute)
whether an object attribute is enabled.
Definition: BaseObject.h:555
bool ActivateScript(int func_type, const string &precode, const string &postcode)
Fire script callback global variable sensor_name and sensor_id will be filled with GetName and GetID...
Definition: BaseObject.cpp:111
flashing the biped. Not implemented.
Definition: BaseObject.h:187
virtual int GetAnimation()
get the scaling.
Definition: BaseObject.h:1033
a list of CParameter{name, value} pairs of anything.
Definition: ParameterBlock.h:108
virtual DVector3 GetPosition()
always bottom center of the bounding shape
Definition: BaseObject.cpp:937
virtual bool IsUseGlobalTime()
whether to use global time to sync animation.
Definition: BaseObject.h:1059