8 #include "ParaScriptingCommon.h" 9 #include "ParaScriptingCharacter.h" 10 #include "ParaScriptingGlobal.h" 11 #include "MiniSceneGraph.h" 21 class CMiniSceneGraph;
70 const char* GetType();
74 int GetMyType()
const;
89 bool IsAttached()
const;
105 void SetPersistent(
bool bPersistent);
119 const char* ToString()
const;
128 const char* ToString1(
const char* sMethod)
const;
142 void CheckLoadPhysics();
159 object GetField(
const char* sFieldname,
const object& output);
167 void SetField(
const char* sFieldname,
const object& input);
171 void CallField(
const char* sFieldname);
183 object GetDynamicField(
const char* sFieldname,
const object& output);
191 void SetDynamicField(
const char* sFieldname,
const object& input);
207 void SetVisible(
bool bVisible);
249 bool CheckAttribute(DWORD attribute);
281 void SetAttribute(DWORD dwAtt,
bool bTurnOn);
303 void SetPosition(
double x,
double y,
double z);
313 void GetPosition(
double *x,
double *y,
double *z);
319 void GetViewCenter(
double *x,
double *y,
double *z);
325 void OffsetPosition (
float dx,
float dy,
float dz);
332 void SetFacing(
float fFacing);
347 void Rotate(
float x,
float y,
float z);
357 void SetScaling(
float s);
370 void SetScale(
float s);
377 object GetRotation(
const object& quat);
383 void SetRotation(
const object& quat);
394 void SetPhysicsGroup(
int nGroup);
402 int GetPhysicsGroup();
409 void SetSelectGroupIndex(
int nGroupIndex);
412 int GetSelectGroupIndex();
424 void SetDensity(
float fDensity);
430 float GetPhysicsRadius();
433 void SetPhysicsRadius(
float fR);
441 float GetPhysicsHeight();
449 void SetPhysicsHeight(
float fHeight);
452 string GetName()
const;
454 const char* GetName_()
const;
464 void SetName(
const char* sName);
470 void SnapToTerrainSurface(
int bUseNorm);
474 bool IsCharacter()
const;
544 void AddEvent(
const char* strEvent,
int nEventType,
bool bIsUnique);
553 void EnablePhysics(
bool bEnable);
556 bool IsPhysicsEnabled();
563 float DistanceToPlayerSq();
565 float DistanceToCameraSq();
574 object GetViewBox(
const object& output);
579 bool HasAttachmentPoint(
int nAttachmentID);
586 void GetAttachmentPosition(
int nAttachmentID,
float * x,
float * y,
float *z);
591 void SetHomeZone(
const char* sHomeZone);
594 const char* GetHomeZone();
603 void SetHeadOnText(
const char* sText,
int nIndex);
606 const char* GetHeadOnText(
int nIndex);
614 void SetHeadOnUITemplateName(
const char* sUIName,
int nIndex);
622 const char* GetHeadOnUITemplateName(
int nIndex);
627 void SetHeadOnTextColor(
const char* color,
int nIndex);
630 void SetHeadOnOffest(
float x,
float y,
float z,
int nIndex);
633 void GetHeadOnOffset(
int nIndex,
float* x,
float* y,
float* z);
636 void ShowHeadOnDisplay(
bool bShow,
int nIndex);
639 bool IsHeadOnDisplayShown(
int nIndex);
642 bool HasHeadOnDisplay(
int nIndex);
651 int GetXRefScriptCount();
654 const char* GetXRefScript(
int nIndex);
659 void GetXRefScriptPosition(
int nIndex,
float *x,
float *y,
float *z);
664 void GetXRefScriptScaling(
int nIndex,
float *x,
float *y,
float *z);
669 float GetXRefScriptFacing(
int nIndex);
676 const char* GetXRefScriptLocalMatrix(
int nIndex);
686 float GetSentientRadius();
689 float GetPerceptiveRadius();
691 void SetPerceptiveRadius(
float fNewRaduis);
694 int GetNumOfPerceivedObject();
700 bool IsAlwaysSentient();
703 void SetAlwaysSentient(
bool bAlways);
709 void MakeSentient(
bool bSentient);
713 void UpdateTileContainer();
716 void MakeGlobal(
bool bGlobal);
723 void SetGroupID(
int nGroup);
732 void SetSentientField(DWORD dwFieldOrGroup,
bool bIsGroup);
740 void SetMovableRegion(
float center_x,
float center_y,
float center_z,
float extent_x,
float extent_y,
float extent_z);
748 void GetMovableRegion(
float* center_x,
float* center_y,
float* center_z,
float* extent_x,
float* extent_y,
float* extent_z);
752 void SetAnimation(
int nAnimID);
762 string GetOnEnterSentientArea()
const;
763 void SetOnEnterSentientArea(
const char* script);
767 string GetOnLeaveSentientArea()
const;
768 void SetOnLeaveSentientArea(
const char* script);
772 string GetOnClick()
const;
773 void SetOnClick(
const char* script);
775 void On_Click(DWORD nMouseKey, DWORD dwParam1, DWORD dwParam2);
779 string GetOnPerceived()
const;
780 void SetOnPerceived(
const char* script);
784 string GetOnFrameMove()
const;
785 void SetOnFrameMove(
const char* script);
790 string GetOnNetSend()
const;
791 void SetOnNetSend(
const char* script);
796 string GetOnNetReceive()
const;
797 void SetOnNetReceive(
const char* script);
808 int GetEffectHandle();
816 void SetEffectHandle(
int nHandle);
829 int AddReference(
const ParaObject& maker,
int nTag);
864 int GetNumReplaceableTextures();
874 ParaAssetObject GetDefaultReplaceableTexture(
int ReplaceableTextureID);
895 bool SetReplaceableTexture(
int ReplaceableTextureID,
ParaAssetObject pTextureEntity);
912 const char* GetName();
915 void SetName(
const char* sName);
948 bool CreateSkyBox(
const char* strObjectName,
const char* strMeshAssetName,
float fScaleX,
float fScaleY,
float fScaleZ,
float fHeightOffset);
949 bool CreateSkyBox_(
const char* strObjectName,
ParaAssetObject& asset,
float fScaleX,
float fScaleY,
float fScaleZ,
float fHeightOffset);
952 void DeleteSkyBox(
const char* strObjectName);
955 void EnableLighting(
bool bEnable);
956 bool IsLightingEnabled();
960 void SetTimeOfDaySTD(
float time);
964 float GetTimeOfDaySTD();
974 void SetFog(
bool bRenderFog,
const char* strFogColor,
float fFogStart,
float fFogEnd,
float fFogDensity);
981 void SetVisible(
bool bVisible);
984 void EnableCamera(
bool bEnable);
991 bool IsCameraEnabled();
1008 ParaObject GetObject3(
float x,
float y,
float z);
1011 ParaObject GetObject4(
float x,
float y,
float z,
float fEpsilon);
1015 int RemoveObject(
const char* name);
1031 int DestroyObject(
const char* name);
1041 void DestroyChildren();
1068 void CameraZoom(
float fAmount);
1077 void CameraZoomSphere(
float center_x,
float center_y,
float center_z,
float raduis);
1085 void CameraRotate(
float dx,
float dy,
float dz);
1092 void CameraPan(
float dx,
float dy);
1097 void CameraSetLookAtPos(
float x,
float y,
float z);
1098 void CameraGetLookAtPos(
float* x,
float* y,
float* z);
1106 void CameraSetEyePosByAngle(
float fRotY,
float fLiftupAngle,
float fCameraObjectDist);
1107 void CameraGetEyePosByAngle(
float* fRotY,
float* fLiftupAngle,
float* fCameraObjectDist);
1108 void CameraSetEyePos(
double x,
double y,
double z);
1109 void CameraGetEyePos(
double* x,
double* y,
double* z);
1116 void Draw(
float fDeltaTime);
1124 void SaveToFile(
const char* sFileName,
int nImageSize = 0);
1125 void SaveToFileEx(
const char* sFileName,
int width = 0,
int height = 0, DWORD dwFormat = 3, UINT MipLevels = 0,
int srcLeft = 0,
int srcTop = 0,
int srcWidth = 0,
int srcHeight = 0);
1132 void SetRenderTargetSize(
int nWidth,
int nHeight);
1137 void SetBackGroundColor(
const char* rgba);
1145 void EnableActiveRendering(
bool bEnable);
1148 bool IsActiveRenderingEnabled();
1182 ParaObject MousePick(
float x,
float y,
float fMaxDistance,
const char* sFilterFunc);
1185 void ShowHeadOnDisplay(
bool bShow);
1188 bool IsHeadOnDisplayShown();
1214 static void FollowObject(
const char* strObjectName);
1222 static void FirstPerson(
int nTransitionMode,
float fHeight,
float fAngle);
1232 static void ThirdPerson(
int nTransitionMode,
float fHeight,
float fFacing,
float fAngle);
1242 static void Default(
int nTransitionMode,
float fHeight,
float fAngle);
1252 static void Fixed(
int nTransitionMode,
float fX,
float fY,
float fZ);
1262 static void GetPosition(
float* x,
float* y,
float* z);
1265 static void GetLookAtPosition(
float* x,
float* y,
float* z);
1270 static void SetKeyMap(
int key,
int scancode);
1273 static int GetKeyMap(
int key);
1326 static ParaObject GetObject(
const char * strObjName);
1332 static bool CheckExist(
int nID);
1341 static ParaObject GetObject3(
float x,
float y,
float z);
1344 static ParaObject GetObject4(
float x,
float y,
float z,
float fEpsilon);
1347 static void GetObject_(
ParaObject* pOut,
const char * strObjName);
1369 static void CreateWorld(
const char * sWorldName,
float fWorldSize,
const char* sConfigFile);
1377 static void Reset();
1423 static ParaObject CreateManagedLoader(
const char * sLoaderName);
1459 static void CreateGlobalTerrain(
float fRadius,
int nDepth,
const char* sHeightmapfile,
1460 float fTerrainSize,
float fElevscale,
int bSwapvertical,
1461 const char* sMainTextureFile,
const char* sCommonTextureFile,
1462 int nMaxBlockSize,
float fDetailThreshold);
1491 static void FireMissile(
int nMissileID,
float fSpeed,
double fromX,
double fromY,
double fromZ,
double toX,
double toY,
double toZ);
1492 static void FireMissile1(
const char* assetname,
float fSpeed,
double fromX,
double fromY,
double fromZ,
double toX,
double toY,
double toZ);
1493 static void FireMissile2(
ParaAssetObject& asset,
float fSpeed,
double fromX,
double fromY,
double fromZ,
double toX,
double toY,
double toZ);
1496 static void SetModified(
bool bModified);
1498 static bool IsModified();
1501 static bool IsScenePaused();
1503 static void PauseScene(
bool bEnable);
1508 static bool IsSceneEnabled();
1510 static void EnableScene(
bool bEnable);
1536 static ParaObject CreateMeshObject(
const char* strObjectName,
const char* strMeshAssetName,
1537 float fOBB_X,
float fOBB_Y,
float fOBB_Z,
float fFacing,
bool bSolid,
const char* localMatrix);
1539 float fOBB_X,
float fOBB_Y,
float fOBB_Z,
float fFacing,
bool bSolid,
const char* localMatrix);
1547 static ParaObject CreateObject(
const char* strType,
const char * strObjectName,
double x,
double y,
double z);
1558 static ParaObject CreateZone(
const char* sZoneName,
const char* sBoundingVolumes,
float width,
float height,
float depth,
float facing);
1569 static ParaObject CreatePortal(
const char* sPortalName,
const char* sHomeZone,
const char* sTargetZone,
const char* sQuadVertices,
float width,
float height,
float depth,
float facing);
1577 static ParaObject CreateVoxelMesh(
const char* strObjectName,
const char* sGridFileName,
const char* sTextureFileName);
1591 static bool CreateSkyBox(
const char* strObjectName,
const char* strMeshAssetName,
float fScaleX,
float fScaleY,
float fScaleZ,
float fHeightOffset);
1592 static bool CreateSkyBox_(
const char* strObjectName,
ParaAssetObject& asset,
float fScaleX,
float fScaleY,
float fScaleZ,
float fHeightOffset);
1595 static void DeleteSkyBox(
const char* strObjectName);
1633 static ParaObject CreateMeshPhysicsObject(
const char* strObjectName,
const char* strMeshAssetName,
float fOBB_X,
float fOBB_Y,
float fOBB_Z,
bool bApplyPhysics,
const char* localMatrix);
1634 static ParaObject CreateMeshPhysicsObject(
const char* strObjectName,
ParaAssetObject& asset,
float fOBB_X,
float fOBB_Y,
float fOBB_Z,
bool bApplyPhysics,
const char* localMatrix);
1636 static void CreateMeshPhysicsObject__(
ParaObject* pOut,
const char* strObjectName,
ParaAssetObject& asset,
float fOBB_X,
float fOBB_Y,
float fOBB_Z,
bool bApplyPhysics,
const char* localMatrix);
1666 static ParaObject CreateLightObject(
const char* strObjectName,
float fPosX,
float fPosY,
float fPosZ,
const char* sLightParams,
const char* localMatrix);
1673 static ParaObject CreateDynamicPhysicsObject(
const char* strObjectName,
const char* strMeshAssetName,
float fOBB_X,
float fOBB_Y,
float fOBB_Z,
bool bRenderMesh);
1691 static ParaObject CreateCharacter(
const char* strObjectName,
const char* strMultiAnimationAssetName,
const char* strScript,
bool bIsGlobal,
1692 float fRadius,
float fFacing,
float fScaling);
1693 static ParaObject CreateCharacter(
const char* strObjectName,
ParaAssetObject& asset,
const char* strScript,
bool bIsGlobal,
1694 float fRadius,
float fFacing,
float fScaling);
1696 static void CreateCharacter__(
ParaObject* pOut,
const char* strObjectName,
ParaAssetObject& asset,
const char* strScript,
bool bIsGlobal,
1697 float fRadius,
float fFacing,
float fScaling);
1704 static void Play3DSound(
const char* strSoundAssetName,
float fX,
float fY,
float fZ);
1714 static void SetGlobalWater(
bool bEnable,
float fWaterLevel);
1717 static float GetGlobalWaterLevel();
1720 static bool IsGlobalWaterEnabled();
1724 static void UpdateOcean();
1732 static void AddWaterRipple(
float x,
float y,
float z);
1743 static void Execute(
const char* strCmd);
1772 static ParaObject MousePick(
float fMaxDistance,
const char* sFilterFunc);
1789 static int SelectObject(
int nGroupIndex,
float x,
float y,
float z,
float radius,
const char* sFilterFunc );
1793 static int SelectObject1(
int nGroupIndex,
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float fRotY,
const char* sFilterFunc );
1809 static void RegisterEvent(
const char* sID,
const char* sScript);
1816 static void RegisterEvent1(DWORD nEventType,
const char* sID,
const char* sScript);
1818 static void UnregisterEvent(
const char* sID);
1820 static void UnregisterAllEvent();
1824 static void EnableMouseClick(
bool bEnable);
1829 static void SetCurrentActor(
ParaObject pActor);
1848 static ParaObject GetObjectByViewBox(
const object& viewbox);
1854 static int GetActionMeshesBySphere(
const object& inout,
float x,
float y,
float z,
float radius);
1873 static int GetObjectsBySphere(
const object& inout,
float x,
float y,
float z,
float radius,
const char* sFilterFunc);
1894 static int GetObjectsByScreenRect(
const object& inout,
int left,
int top,
int right,
int bottom,
const char* sFilterFunc,
float fMaxDistance);
1903 static void OnTerrainChanged(
float x,
float y,
float fRadius);
1910 static int SaveAllCharacters();
1913 static void ShowHeadOnDisplay(
bool bShow);
1916 static bool IsHeadOnDisplayShown();
1926 static int LoadNPCsByRegion(
float min_x,
float min_y,
float min_z,
float max_x,
float max_y,
float max_z,
bool bReload);
1936 static void SetCharacterRegionPath(
int slot,
const std::string& path);
1943 static void SetCharTextureSize(
int nCharacterTexSize,
int nCartoonFaceTexSize);
1950 static void SetCharRegionCoordinates(
int nRegionIndex,
int xpos,
int ypos,
int xsize,
int ysize);
1961 static void SetTimeOfDay(
float time);
1964 static void SetTimeOfDaySTD(
float time);
1967 static float GetTimeOfDay();
1971 static float GetTimeOfDaySTD();
1974 static void SetMaximumAngle(
float fMaxAngle);
1979 static float AdvanceTimeOfDay(
float timeDelta);
1984 static void SetDayLength(
float fMinutes);
1987 static float GetDayLength();
2000 static void SetShadowMethod(
int nMethod);
2001 static int GetShadowMethod();
2004 static void EnableLighting(
bool bEnable);
2005 static bool IsLightingEnabled();
2015 static void SetFog(
bool bRenderFog,
const char* strFogColor,
float fFogStart,
float fFogEnd,
float fFogDensity);
2029 static int DeleteMiniSceneGraph(
const char* name);
2032 static void EnableMiniSceneGraph(
bool bEnable);
2035 static bool IsMiniSceneGraphEnabled();
2046 static void EnablePostProcessing(
bool bEnable,
const char* sCallbackScript);
2049 static bool IsPostProcessingEnabled();
2058 static bool GetScreenPosFrom3DPoint(
float x,
float y,
float z,
const object& output);
2065 static void SetMaxRenderCount(
int nRenderImportance,
int nCount);
2072 static int GetMaxRenderCount(
int nRenderImportance);
ParaMiniSceneGraph class:
Definition: ParaScriptingScene.h:903
The camera controller.
Definition: ParaScriptingScene.h:1198
Definition: combase.h:159
Mini scene graph does not use a spatial partitions for its stored objects, instead it just implement ...
Definition: MiniSceneGraph.h:29
different physics engine has different winding order.
Definition: EventBinding.h:32
ParaObject class: it is used to control game scene objects from scripts.
Definition: ParaScriptingScene.h:56
ParaScene namespace contains a list of HAPI functions to create and modify scene objects in paraworld...
Definition: ParaScriptingScene.h:1291
ParaObject class: it is used to control game scene objects from scripts.
Definition: ParaScriptingCharacter.h:241
bool IsValid() const
check if the object is valid
Definition: ParaScriptingScene.h:920
a list of CParameter{name, value} pairs of anything.
Definition: ParaScriptingCommon.h:37
this is an interface class for game objects, such as NPC, OPC and players.
Definition: IGameObject.h:15
Definition: PEtypes.h:507
it represents an attribute object associated with an object.
Definition: ParaScriptingGlobal.h:458
Defines the base class of all scene elements:CBaseObject for Parallel World Engine.
Definition: BaseObject.h:230
for luabind, The main drawback of this approach is that the compilation time will increase for the fi...
Definition: luaSQLite.cpp:1971
it represents an asset entity.
Definition: ParaScriptingCommon.h:85