My Project
|
Mini scene graph does not use a spatial partitions for its stored objects, instead it just implement a simple parent/child relationships. More...
#include <MiniSceneGraph.h>
Public Types | |
typedef ParaEngine::weak_ptr< IObject, CMiniSceneGraph > | WeakPtr_type |
![]() | |
enum | _SceneObjectType { BaseObject = 0, ContainerObject = 0x1, MeshObject = 0x1<<1, SkyMesh = 0x1<<2, BipedObject = 0x1<<3, SpriteObject = 0x1<<4, SceneRoot = 0x1<<5, OPCBiped = 0x1<<6, RPGBiped = 0x1<<7, MDXObject = 0x1<<8, MeshPhysicsObject = 0x1<<9, DynamicObject = 0x1<<10, ViewCullingObject = 0x1<<11, MissileObject = 0x1<<12, GameObject = 0x1<<13, LightObject = 0x1<<14, MiniSceneGraph = 0x1<<15, VoxelMesh = 0x1<<16, ManagedLoader = 0x1<<17, ZoneNode = 0x1<<18, PortalNode = 0x1<<19, AntiPortalNode = 0x1<<20, CadObject = 0x1<<21 } |
enum | CallBackType { Type_EnterSentientArea =0, Type_LeaveSentientArea, Type_Click, Type_Event, Type_Perception, Type_FrameMove, Type_Net_Send, Type_Net_Receive, Type_OnLoadScript, Type_OnAssetLoaded, Type_Paint, Type_Unknown } |
call back type | |
enum | NPL_STRING { NPL_CREATE = 0, NPL_CREATE_IN_LOADER = 0x1<<1, NPL_UPDATE = 0x1<<2, NPL_DELETE = 0x1<<3, NPL_DONOT_OUTPUT_ASSET = 0x1<<4 } |
by which method an object is converted to NPL string. More... | |
enum | CompressOption { ReleaseDevices = 1, ReleasePhysics = 2, ReleaseEvents = 4 } |
typedef ParaEngine::weak_ptr< IObject, CBaseObject > | WeakPtr_type |
typedef unordered_ref_array< CBaseObject * > | CChildObjectList_Type |
typedef std::list< ObjectEvent > | ObjectEventList_Type |
![]() | |
typedef ParaEngine::weak_ptr< IObject, IAttributeFields > | WeakPtr_type |
![]() | |
typedef ParaEngine::weak_ptr< IObject > | WeakPtr_type |
![]() | |
typedef std::vector< ScriptCallback > | ObjectCallbackPool_Type |
![]() | |
enum | PaintDeviceMetric { PdmWidth = 1, PdmHeight, PdmDepth } |
Public Member Functions | |
CMiniSceneGraph (void) | |
virtual CBaseObject::_SceneObjectType | GetType () |
virtual int | GetAttributeClassID () |
attribute class ID should be identical, unless one knows how overriding rules work. More... | |
virtual const char * | GetAttributeClassName () |
a static string, describing the attribute class object's name | |
virtual const char * | GetAttributeClassDescription () |
a static string, describing the attribute class object | |
virtual int | InstallFields (CAttributeClass *pClass, bool bOverride) |
this class should be implemented if one wants to add new attribute. More... | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, IsLightEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, EnableLight_s, bool) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, GetBackGroundColor_s, Vector3 *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, SetBackGroundColor_s, Vector3) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, IsSunLightEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, EnableSunLight_s, bool) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, IsFogEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, EnableFog_s, bool) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, GetFogColor_s, Vector3 *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, SetFogColor_s, Vector3) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, GetFogStart_s, float *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, SetFogStart_s, float) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, GetFogEnd_s, float *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, SetFogEnd_s, float) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, GetFogDensity_s, float *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, SetFogDensity_s, float) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, IsRenderSky_s, bool *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, EnableSkyRendering_s, bool) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, IsHeadOnDisplayShown_s, bool *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, ShowHeadOnDisplay_s, bool) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, IsUsePointTexture_s, bool *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, SetUsePointTexture_s, bool) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, GetMaxHeadOnDisplayDistance_s, float *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, SetMaxHeadOnDisplayDistance_s, float) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, GetRenderPipelineOrder_s, int *) | |
ATTRIBUTE_METHOD1 (CMiniSceneGraph, SetRenderPipelineOrder_s, int) | |
bool | IsRenderSky () |
whether rendering the sky | |
void | EnableSkyRendering (bool bEnable) |
void | SetFogColorFactor (const LinearColor &fogColorFactor) |
fog parameters | |
const LinearColor & | GetFogColorFactor () |
void | SetFogColor (const LinearColor &fogColor) |
LinearColor | GetFogColor () |
void | SetFogStart (float fFogStart) |
float | GetFogStart () |
void | SetFogEnd (float fFogEnd) |
float | GetFogEnd () |
void | SetFogDensity (float fFogDensity) |
float | GetFogDensity () |
void | EnableFog (bool bEnableFog) |
bool | IsFogEnabled () |
bool | IsLightEnabled () |
get light enable state | |
void | EnableLight (bool bEnable) |
whether use light | |
bool | IsSunLightEnabled () |
get light enable state | |
void | EnableSunLight (bool bEnable) |
whether use light | |
CSkyMesh * | GetCurrentSky () |
return NULL if no sky defined. More... | |
bool | CreateSkyBox (const string &strObjectName, AssetEntity &MeshAsset, float fScaleX, float fScaleY, float fScaleZ, float fHeightOffset) |
create a sky box and add it to the current list, and select it as the current skybox. More... | |
bool | DeleteSkyBox (const string &strObjectName) |
delete a name sky box. More... | |
CSunLight & | GetSunLight () |
get sun light object More... | |
void | SetActor (CBaseObject *pActor) |
set the actor: The camera always focuses on actor, so this actor can be used to control the current camera position. More... | |
CBaseObject * | GetActor () |
get the current actor | |
virtual void | Cleanup () |
clean up all resource objects More... | |
virtual void | DestroyChildren () |
Completely destroy child nodes from memory recursively. More... | |
CCanvasCamera * | GetCamera () |
get the camera object. More... | |
CBaseCamera * | GetCurrentCamera () |
get the current camera | |
void | CameraZoom (float fAmount) |
Zoom the camera. More... | |
void | CameraZoomSphere (const CShapeSphere &sphere) |
reset the camera parameters to view the entire sphere at best (default) distance More... | |
void | CameraSetLookAtPos (float x, float y, float z) |
set the camera look at position | |
void | CameraGetLookAtPos (float *x, float *y, float *z) |
void | CameraSetEyePosByAngle (float fRotY, float fLiftupAngle, float fCameraObjectDist) |
set the camera eye position More... | |
void | CameraGetEyePosByAngle (float *fRotY, float *fLiftupAngle, float *fCameraObjectDist) |
void | CameraSetEyePos (double x, double y, double z) |
void | CameraGetEyePos (double *x, double *y, double *z) |
void | CameraRotate (float dx, float dy, float dz) |
rotate the camera round the object on canvas More... | |
void | CameraPan (float dx, float dy) |
pan the camera More... | |
int | PrepareRender (CBaseCamera *pCamera, SceneState *pSceneState) |
this function is called at the beginning of each frame to build the scene state from the specified camera Objects which are potentially visible are put to predefined queues of the scene states. More... | |
virtual bool | PrepareRenderObject (CBaseObject *pObj, CBaseCamera *pCamera, SceneState &sceneState) |
decide whether pObj is visible by the pCamera, if so, it will add it to the proper render queue in sceneState. More... | |
int | RenderSelection (DWORD dwSelection=0xffffffff, double dTimeDelta=0) |
render objects in the post rendering list. More... | |
int | RenderHeadOnDisplay () |
render the head on display, return the number of objects rendered More... | |
void | Draw (float fDeltaTime) |
draw the content of the scene graph to the current render target. More... | |
void | SetMaskTexture (TextureEntity *pTexture) |
this is an optional 2D mask, which is drawn over the entire canvas after scene is rendered in to it. More... | |
const char * | GetName () |
get name | |
void | SetName (const char *sName) |
set the object name. More... | |
void | EnableCamera (bool bEnable) |
enable or disable a given camera | |
bool | IsCameraEnabled () |
whether camera is enabled. More... | |
bool | IsNeedUpdate () |
even when active rendering is on, the mini scene graph will not update itself, if need update is false. More... | |
CBaseObject * | GetObject (const char *name, bool bRecursive=false) |
get object by name, if there are multiple objects with the same name, the last added one is inserted. More... | |
CBaseObject * | GetObject (float x, float y, float z, float fEpsilon=0.01f) |
get the first object that matches the position. More... | |
int | RemoveObject (const char *name, bool bRecursive=false) |
remove an object from this scene graph but do not destroy it. More... | |
int | RemoveObject (CBaseObject *pObj) |
remove an object from this scene graph but do not destroy it.This function will search the scene recursively this function can be used to move a node from one scene graph to another | |
int | DestroyObject (const char *name, bool bRecursive=false) |
destroy all objects with the given name. More... | |
int | DestroyObject (CBaseObject *pObj) |
delete an object from this scene graph but do not destroy it.This function will search the scene recursively this function can be used to move a node from one scene graph to another Note: this is like calling RemoveObject(pObj) and then delete the object. More... | |
void | Reset () |
clear the entire scene graph | |
virtual void | AddChild (CBaseObject *pObject) |
add another object as the child of this object | |
SceneState * | GetSceneState () |
get the scene state information. More... | |
bool | PickObject (const CShapeRay &ray, CBaseObject **pTouchedObject, float fMaxDistance=0, OBJECT_FILTER_CALLBACK pFnctFilter=NULL) |
bool | PickObject (int nScreenX, int nScreenY, CBaseObject **pTouchedObject, float fMaxDistance=0, OBJECT_FILTER_CALLBACK pFnctFilter=NULL) |
void | ShowHeadOnDisplay (bool bShow) |
show or hide all scene's objects' head on display | |
bool | IsHeadOnDisplayShown () |
whether all scene's objects' head on display | |
void | SetMaxHeadOnDisplayDistance (float fDist) |
show or hide all scene's objects' head on display | |
float | GetMaxHeadOnDisplayDistance () |
whether all scene's objects' head on display | |
bool | IsUsePointTexture () const |
void | SetUsePointTexture (bool val) |
Vector3 | GetRenderOrigin () |
get the render origin in the rendering coordinate system.rendering coordinate system is a 3D coordinate system parallel to the world coordinate system, but with a different origin called render origin.Render origin is an arbitrary 3D point chosen near the current camera eye position. More... | |
IBatchedElementDraw * | GetBatchedElementDrawer () |
get debug draw | |
bool | SetEffect (CEffectFile *pEffect) |
set the current effect | |
void | SetRenderPipelineOrder (int nOrder) |
default to PIPELINE_3D_SCENE. More... | |
int | GetRenderPipelineOrder () |
default to PIPELINE_3D_SCENE. More... | |
void | SetBackGroundColor (const LinearColor &bgColor) |
set the color of the scene ground when it is not enabled.When scene is enabled, the background color is always the fog color. More... | |
LinearColor | GetBackGroundColor () |
Get the color of the scene ground when it is not enabled.When scene is enabled, the background color is always the fog color. More... | |
![]() | |
ATTRIBUTE_DEFINE_CLASS (CRenderTarget) | |
ATTRIBUTE_SUPPORT_CREATE_FACTORY (CRenderTarget) | |
ATTRIBUTE_METHOD1 (CRenderTarget, GetClearColor_s, Vector3 *) | |
ATTRIBUTE_METHOD1 (CRenderTarget, SetClearColor_s, Vector3) | |
ATTRIBUTE_METHOD1 (CRenderTarget, GetRenderTargetSize_s, Vector2 *) | |
ATTRIBUTE_METHOD1 (CRenderTarget, SetRenderTargetSize_s, Vector2) | |
ATTRIBUTE_METHOD1 (CRenderTarget, IsActiveRenderingEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CRenderTarget, EnableActiveRendering_s, bool) | |
ATTRIBUTE_METHOD1 (CRenderTarget, IsDirty_s, bool *) | |
ATTRIBUTE_METHOD1 (CRenderTarget, SetDirty_s, bool) | |
ATTRIBUTE_METHOD1 (CRenderTarget, IsPersistentRenderTarget_s, bool *) | |
ATTRIBUTE_METHOD1 (CRenderTarget, SetPersistentRenderTarget_s, bool) | |
DEFINE_SCRIPT_EVENT (CRenderTarget, Paint) | |
define the On_Paint script callback for painting in 2d space. More... | |
virtual CPaintEngine * | paintEngine () const |
Returns the paint engine. More... | |
virtual int | metric (PaintDeviceMetric metric) const |
bool | InitWithWidthAndHeight (int width, int height, D3DFORMAT format=D3DFMT_A8R8G8B8, D3DFORMAT depthStencilFormat=D3DFMT_D16) |
initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format | |
virtual HRESULT | Draw (SceneState *sceneState) |
only for drawable objects | |
virtual bool | Begin () |
starts rendering to texture. More... | |
void | CheckInit () |
virtual void | End () |
end rendering to texture, restore old render target | |
virtual void | Clear (const LinearColor &color, float depthValue=1.f, int stencilValue=0, DWORD flags=D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER) |
this is usually the first function to call after calling begin(). More... | |
void | EnableActiveRendering (bool bEnable) |
if true, contents will be drawn to the current render target each frame. More... | |
bool | IsActiveRenderingEnabled () const |
if true, contents will be drawn to the current render target each frame. More... | |
HRESULT | InitDeviceObjects () |
init device objects. More... | |
HRESULT | RestoreDeviceObjects () |
restore device object | |
HRESULT | InvalidateDeviceObjects () |
Invalid device object. | |
HRESULT | DeleteDeviceObjects () |
delete device objects | |
virtual void | DoPaint (CPainter *painter=NULL) |
invoke the On_Paint script event handler if any. More... | |
void | SetClearColor (const LinearColor &bgColor) |
set the color of the scene ground when it is not enabled.When scene is enabled, the background color is always the fog color. More... | |
LinearColor | GetClearColor () |
Get the color of the scene ground when it is not enabled.When scene is enabled, the background color is always the fog color. More... | |
bool | IsPersistentRenderTarget () const |
default to false, where the render target texture will be deleted when scene object is deleted. More... | |
void | SetPersistentRenderTarget (bool val) |
virtual TextureEntity * | GetTexture () |
the canvas texture, which can be used as any other ordinary texture on 3D or 2D object. More... | |
virtual AssetEntity * | GetPrimaryAsset () |
get the asset render target object. More... | |
HRESULT | SaveToFile (const char *filename, int width=0, int height=0, DWORD dwFormat=3, UINT MipLevels=0, int srcLeft=0, int srcTop=0, int srcWidth=0, int srcHeight=0) |
save o a different texture file format and save with full mipmapping to disk. More... | |
ImageEntity * | NewImage (bool bFlipImage=true, Color colorKey=0) |
void | SetRenderTargetSize (int nWidth, int nHeight) |
set the canvas size in pixels More... | |
void | GetRenderTargetSize (int *nWidth, int *nHeight) |
void | SetRenderTargetSize (const Vector2 &size) |
Vector2 | GetRenderTargetSize () |
int | GetTextureWidth () const |
int | GetTextureHeight () const |
bool | IsDirty () const |
whether render target is dirty and should be redraw on the next frame. More... | |
void | SetDirty (bool val) |
int | GetLifeTime () const |
void | SetLifeTime (int val) |
virtual bool | IsDead () |
whether this object should be removed some time in the future. More... | |
virtual void | SetDead () |
const std::string & | GetCanvasTextureName () |
void | SetCanvasTextureName (const std::string &sValue) |
![]() | |
virtual void | Clone (CBaseObject *obj) |
Clone the object's contains to a pointer. More... | |
virtual CBaseObject * | Clone () |
Clone the object's contains and return a pointer to the newly created object. More... | |
virtual std::string | ToString (DWORD nMethod) |
convert the object to an NPL string by which this object may be created or deleted. More... | |
int | GetID () |
the ID of the object. More... | |
virtual bool | AddChildAttributeObject (IAttributeFields *pChild, int nRowIndex=-1, int nColumnIndex=0) |
add child object. More... | |
virtual void * | QueryObjectByName (const std::string &sObjectType) |
convert to object of a given type. More... | |
virtual void * | QueryObject (int nObjectType) |
convert to object of a given type. More... | |
ATTRIBUTE_METHOD1 (CBaseObject, GetID_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsGlobal_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetFacing_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetFacing_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetYaw_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetYaw_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetPitch_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetPitch_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetRoll_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetRoll_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetHeight_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeight_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetWidth_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetWidth_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetDepth_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetDepth_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetRadius_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetRadius_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetPosition_s, DVector3 *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetPosition_s, DVector3) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetAssetFileName_s, const char **) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetAssetFileName_s, const char *) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetTechHandle_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetTechHandle_s, int) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetCtorPercentage_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetCtorPercentage_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetHomeZone_s, const char **) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHomeZone_s, const char *) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetShowBoundingBox_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetShowBoundingBox_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetPhysicsGroup_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetPhysicsGroup_s, int) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetPhysicsGroupMask_s, DWORD *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetPhysicsGroupMask_s, DWORD) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetSelectGroupIndex_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetSelectGroupIndex_s, int) | |
ATTRIBUTE_METHOD (CBaseObject, Reset_s) | |
DEFINE_SCRIPT_EVENT_GET (CBaseObject, OnAssetLoaded) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetOnAssetLoaded_s, const char *) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetRenderOrder_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetRenderOrder_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetRenderImportance_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetRenderImportance_s, int) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetRenderDistance_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetRenderDistance_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetAnimation_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetAnimation_s, int) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetAnimFrame_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetAnimFrame_s, int) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsAnimEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, EnableAnim_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsUseGlobalTime_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetUseGlobalTime_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetChildCount_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetNormal_s, Vector3 *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetNormal_s, Vector3) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsTransparent_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetTransparent_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsVisible_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetVisibility_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsShadowCaster_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetShadowCaster_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsShadowReceiver_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetShadowReceiver_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsBillboarded_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetBillboarded_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsSkipRender_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetSkipRender_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsSkipPicking_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetSkipPicking_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsSkipTerrainNormal_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetSkipTerrainNormal_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetSelectionEffect_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetSelectionEffect_s, int) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsHeadOnZEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOnZEnabled_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsHeadOn3DScalingEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOn3DScalingEnabled_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsHeadOnUseGlobal3DScaling_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOnUseGlobal3DScaling_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetHeadOnNearZoomDist_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOnNearZoomDist_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetHeadOnFarZoomDist_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOnFarZoomDist_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetHeadOnMinUIScaling_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOnMinUIScaling_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetHeadOnMaxUIScaling_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOnMaxUIScaling_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetHeadOnAlphaFadePercentage_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOnAlphaFadePercentage_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetHeadOn3DFacing_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetHeadOn3DFacing_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsPersistent_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetPersistent_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsDead_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetDead_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsTileObject_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetTileObject_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetFrameNumber_s, int *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetFrameNumber_s, int) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetOpacity_s, float *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetOpacity_s, float) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsLastFrameRendered_s, bool *) | |
ATTRIBUTE_METHOD (CBaseObject, DestroyChildren_s) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetRenderMatrix_s, Matrix4 *) | |
ATTRIBUTE_METHOD1 (CBaseObject, SetLocalTransform_s, const Matrix4 &) | |
ATTRIBUTE_METHOD1 (CBaseObject, GetLocalTransform_s, Matrix4 *) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsPhysicsEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, EnablePhysics_s, bool) | |
ATTRIBUTE_METHOD1 (CBaseObject, IsLODEnabled_s, bool *) | |
ATTRIBUTE_METHOD1 (CBaseObject, EnableLOD_s, bool) | |
virtual IAttributeFields * | GetChildAttributeObject (const std::string &sName) |
get attribute by child object. More... | |
virtual int | GetChildAttributeObjectCount (int nColumnIndex=0) |
get the number of child objects (row count) in the given column. More... | |
virtual int | GetChildAttributeColumnCount () |
we support multi-dimensional child object. More... | |
virtual IAttributeFields * | GetChildAttributeObject (int nRowIndex, int nColumnIndex=0) |
virtual bool | IsGlobal () |
whether this object is global. More... | |
bool | IsBiped () |
virtual IGameObject * | QueryIGameObject () |
this may return NULL, if the object does not implement the IGameObject interface. More... | |
virtual IAttributeFields * | GetAttributeObject () |
bool | CheckVolumnField (DWORD volType) |
Use CheckAttribute() | |
bool | CheckAttribute (DWORD attribute) |
whether an object attribute is enabled. More... | |
void | SetAttribute (DWORD dwAtt, bool bTurnOn=true) |
enable or disable a given attribute. More... | |
void | SetBillboarded (bool bBillboarded) |
bool | IsBillboarded () |
if the model asset file name ended with "_b" it will be treated as billboarded. More... | |
void | SetShadowReceiver (bool bEnable) |
bool | IsShadowReceiver () |
if the model asset file name ended with "_r" it will be treated as shadow receiver. More... | |
void | SetShadowCaster (bool bEnable) |
set whether it is shadow caster. More... | |
bool | IsShadowCaster () |
void | SetVegetation (bool bIsVegetation) |
whether to render this mesh using the vegetation shader | |
bool | IsVegetation () |
whether to render this mesh using the vegetation shader | |
void | ShowBoundingBox (bool bShowBoundingBox) |
set whether to show bounding box for this object. | |
bool | IsShowBoundingBox () |
get whether to show bounding box for this object. | |
CZoneNode * | GetHomeZone () |
get the home zone of this object if any. More... | |
void | SetHomeZone (CZoneNode *pZone) |
set the home zone of this object if any. More... | |
bool | IsVisible () |
invisible object will not be drawn. More... | |
void | SetVisibility (bool bVisible) |
set the visibility of this object. More... | |
bool | IsRenderable () |
whether this object can be rendered. More... | |
void | SetSkipRender (bool bSkipRender) |
set whether object should be excluded from the skip render | |
bool | IsSkipRender () |
get whether object should be excluded from the render queue. More... | |
void | SetSkipPicking (bool bSkipPicking) |
set whether object should be excluded from picking | |
bool | IsSkipPicking () |
get whether object should be excluded from picking. More... | |
void | SetSkipTerrainNormal (bool bSkip) |
if specified, this character will always be perpendicular to the ground, regardless to the terrain normal. More... | |
bool | IsSkipTerrainNormal () |
if specified, this character will always be perpendicular to the ground, regardless to the terrain normal. More... | |
bool | CanPick () |
get whether object can be picked by mouse picking. More... | |
virtual bool | CanHasPhysics () |
if the object may contain physics | |
virtual void | LoadPhysics () |
load the physics objects. | |
virtual void | UnloadPhysics () |
load the physics object | |
virtual void | EnablePhysics (bool bEnable) |
this function will turn on or off the physics of the object. More... | |
virtual void | SetAlwaysLoadPhysics (bool bEnable) |
by default physics is lazy-load when player walk into its bounding box, setting this to false will always load the physics. More... | |
virtual bool | IsPhysicsEnabled () |
virtual bool | ViewTouch () |
this function is called, when the object is in view range. More... | |
void | SetRenderImportance (int nRenderImportance) |
the larger, the more important. More... | |
int | GetRenderImportance () |
float | GetRenderOrder () const |
0 if automatic, larger number renders after smaller numbered object. More... | |
void | SetRenderOrder (float val) |
CChildObjectList_Type & | GetChildren () |
– Base object functions | |
CBaseObject * | GetChildByName (const string &name, bool bRecursive=false) |
get child by name: it may return NULL if the child does not exist. More... | |
int | DestroyChildByName (const string &name, bool bRecursive=false) |
destroy a child by name. More... | |
int | RemoveChildByName (const string &name, bool bRecursive=false) |
remove a child by name but it does not destroy it. More... | |
int | RemoveChild (const CBaseObject *pObj, bool bRecursive=false) |
remove a child by pointer but it does not destroy it. More... | |
virtual void | SetOnAssetLoaded (const char *sCallbackScript) |
set the callback script whenever the primary asset is successfully loaded. More... | |
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, so that caller knows who is firing the callback script. More... | |
bool | ActivateScript (int func_type, const string &precode) |
bool | ActivateScript (int func_type) |
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 bounding box (AABB). More... | |
virtual void | GetBoundingBox (float *fOBB_X, float *fOBB_Y, float *fOBB_Z, float *fFacing) |
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 bounding box (AABB). More... | |
virtual void | GetBoundRect (float *fWidth, float *fHeight, float *fFacing) |
virtual void | SetRadius (float fRadius) |
Set the object shape to Sphere and sphere parameters. More... | |
virtual float | GetRadius () |
virtual int | GetSelectionEffect () |
get the render effect when character is in selected state. More... | |
virtual void | SetSelectionEffect (int nStyle) |
get the render effect when character is in selected state. More... | |
virtual bool | IsPersistent () |
whether the object is persistent in the world. More... | |
virtual void | SetPersistent (bool bPersistent) |
whenever a persistent object is made non-persistent, the SaveToDB() function will actually removed it from the database and the action can not be recovered. More... | |
virtual void | SetOpacity (float fOpacity) |
virtual float | GetOpacity () |
virtual HRESULT | RendererRecreated () |
virtual float | GetRenderDistance () |
we will not render this object if the object's position to camera eye position is further than this value. More... | |
virtual void | SetRenderDistance (float fDist) |
virtual int | GetPrimaryTechniqueHandle () |
when batch-rendering a group of objects, objects are usually sorted by their render techniques and then by their primary asset. More... | |
virtual void | SetPrimaryTechniqueHandle (int nHandle) |
Set a new render technique handle. More... | |
virtual CParameterBlock * | GetEffectParamBlock (bool bCreateIfNotExist=false) |
get effect parameter block with this object. More... | |
virtual bool | IsTransparent () |
whether the object contains transparent material. More... | |
virtual void | SetTransparent (bool bIsTransparent) |
Set whether the object is transparent. More... | |
virtual int | GetNumReplaceableTextures () |
get the total number of replaceable textures, which is the largest replaceable texture ID. More... | |
virtual TextureEntity * | GetDefaultReplaceableTexture (int ReplaceableTextureID) |
get the default replaceable texture by its ID. More... | |
virtual TextureEntity * | GetReplaceableTexture (int ReplaceableTextureID) |
get the current replaceable texture by its ID. More... | |
virtual bool | SetReplaceableTexture (int ReplaceableTextureID, TextureEntity *pTextureEntity) |
set the replaceable texture at the given index with a new texture. More... | |
virtual void | OnSelect (int nGroupID) |
called when an object is selected. More... | |
virtual void | OnDeSelect () |
called whenever an object is un-selected. More... | |
virtual void | SetParent (CBaseObject *pParent) |
this function is called by parent class to set the child's parent. More... | |
virtual CBaseObject * | GetParent () |
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. More... | |
virtual void | Animate (double dTimeDelta, int nRenderNumber=0) |
animate the model by a given delta time. More... | |
virtual Matrix4 * | GetAttachmentMatrix (Matrix4 &pOut, int nAttachmentID=0, int nRenderNumber=0) |
Get the specified attachment matrix of the current model. More... | |
virtual bool | HasAttachmentPoint (int nAttachmentID=0) |
whether it has an attachment point More... | |
virtual Vector3 * | GetAttachmentPosition (Vector3 &pOut, int nAttachmentID=0, int nRenderNumber=0) |
whether it has an attachment point More... | |
virtual CBipedStateManager * | GetBipedStateManager (bool bCreateOnDemand=true) |
get biped state manager More... | |
virtual void | SetPhysicsGroup (int nGroup) |
set the physics group ID to which this object belongs to default to 0, must be smaller than 32. More... | |
virtual int | GetPhysicsGroup () |
Get the physics group ID to which this object belongs to default to 0, must be smaller than 32. More... | |
virtual void | SetAnimation (int nAnimID) |
Set the current animation id. More... | |
virtual void | SetPhysicsGroupMask (DWORD dwValue) |
set groups Mask used to filter physics objects, default to 0xffffffff | |
virtual DWORD | GetPhysicsGroupMask () |
get groups Mask used to filter physics objects, default to 0xffffffff | |
virtual int | GetAnimation () |
get the scaling. More... | |
virtual void | SetAnimFrame (int nFrame) |
set the current animation frame number relative to the beginning of current animation. More... | |
virtual int | GetAnimFrame () |
get the current animation frame number relative to the beginning of current animation. More... | |
virtual void | EnableAnim (bool bAnimated) |
whether animation is enabled. More... | |
virtual bool | IsAnimEnabled () |
virtual void | SetUseGlobalTime (bool bUseGlobalTime) |
whether to use global time to sync animation. More... | |
virtual bool | IsUseGlobalTime () |
whether to use global time to sync animation. More... | |
virtual float | GetPhysicsRadius () |
get the radius for physics simulation. More... | |
virtual DVector3 | GetPosition () |
always bottom center of the bounding shape | |
virtual void | SetPosition (const DVector3 &v) |
always bottom center of the bounding shape | |
virtual float | GetHeight () |
get object height y axis: only for object that has a Height property, usually is height of the bounding box | |
virtual void | SetHeight (float fHeight) |
virtual float | GetWidth () |
get object width: x axis | |
virtual void | SetWidth (float fWidth) |
virtual float | GetDepth () |
get object depth: z axis | |
virtual void | SetDepth (float fDepth) |
virtual Vector3 | GetNormal () |
virtual void | SetNormal (const Vector3 &pNorm) |
virtual void | PushParam () |
Usually, this is used in canvas drawing. More... | |
virtual void | PopParam () |
Usually, this is used in canvas drawing. More... | |
virtual const std::string & | GetAssetFileName () |
get asset file name | |
virtual void | SetAssetFileName (const std::string &sFilename) |
set asset file name | |
virtual bool | IsStanding () |
virtual float | GetCtorPercentage () |
Get the object construction percentage (progress) in the range[0,1]. More... | |
virtual void | SetCtorPercentage (float fPercentage) |
Set the object construction percentage (progress) in the range[0,1]. More... | |
virtual void | AutoSelectTechnique () |
automatically select the proper technique for the rendering of the object. More... | |
virtual void | Report (vector< string > &v_sReport) |
virtual HRESULT | ResetTime () |
virtual bool | HasAlphaBlendedObjects () |
return true if the object contains alpha blended render pass. More... | |
virtual void | CompressObject (CompressOption option=(CompressOption) 0xffff) |
Compress the object to save memory. More... | |
virtual IViewClippingObject * | GetViewClippingObject () |
return the view clipping object used for object-level clipping when rendering this object. | |
virtual void | UpdateFrameNumber (int nFrameNumber) |
this function is called to update the render frame number of this object. More... | |
void | SetFrameNumber (int nFrameNumber) |
int | GetFrameNumber () |
get the frame number that this object is last accessed. More... | |
bool | CheckFrameNumber (int nFrameNumber) |
call this function whenever a render may render this object. More... | |
bool | IsLastFrameRendered () |
check to see if the last frame is rendered. More... | |
void | SetMyType (ObjectType t) |
set the type of the object, it tells what this object is used for. More... | |
ObjectType | GetMyType () |
void | SnapToTerrainSurface (bool bUseNorm=true) |
call this function to reset the y component and norm of the object to the global terrain surface at (x,0,z), where (x,y,z) is the object's current position. More... | |
virtual ObjectShape | GetObjectShape () |
get the object shape | |
virtual void | SetObjectShape (ObjectShape shape) |
set the object shape | |
CTerrainTile * | GetTileContainer () |
get the quad-tree terrain tile that this game object is currently visiting. More... | |
virtual void | SetTileContainer (CTerrainTile *val) |
virtual void | UpdateTileContainer () |
update the tile container according to the current position of the game object. More... | |
void | SetHomeZoneName (const char *sName) |
set the home zone name. More... | |
const char * | GetHomeZoneName () |
void | SetSelectGroupIndex (int nGroupIndex=-1) |
set the selection group index. More... | |
int | GetSelectGroupIndex () |
get the selection group index. More... | |
virtual bool | IsTileObject () |
if true, we will attach this object to quad-tree terrain tile according to its attributes when adding to the scene if false, we will automatically attach it to a container object named after its class name. | |
virtual void | SetTileObject (bool bIsTileObject) |
bool | IsGeometryDirty () const |
whether the shape of the object is dirty, such as model, size, facing, local transform is changed. More... | |
void | SetGeometryDirty (bool bDirty=true) |
bool | IsLODEnabled () const |
whether to enable lod if there is lod. More... | |
void | EnableLOD (bool val) |
virtual void | UpdateGeometry () |
this function is usually called after asset file has changed. More... | |
virtual void | SetLocalTransform (const Matrix4 &mXForm) |
set local transform directly | |
virtual void | GetLocalTransform (Matrix4 *localTransform) |
get local transform | |
virtual int | GetMeshTriangleList (std::vector< Vector3 > &output, int nOption=0) |
return triangle list | |
![]() | |
virtual void | GetVertices (Vector3 *pVertices, int *nNumber) |
get all the vertices which can represent the object's shape. More... | |
virtual void | GetRenderVertices (Vector3 *pVertices, int *nNumber) |
same as GetVertices(). More... | |
virtual void | GetVerticesWithOrigin (const Vector3 *vOrigin, Vector3 *pVertices, int *nNumber) |
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 physics mesh. More... | |
virtual void | SetRotation (const Quaternion &quat) |
set rotation using a quaternion. More... | |
virtual void | GetRotation (Quaternion *quat) |
get rotation using a quaternion | |
virtual void | SetScaling (float s) |
set the scale of the object. More... | |
virtual float | GetScaling () |
get the scaling. More... | |
virtual Vector3 | GetRenderOffset () |
get the offset(translation) of the object used for rendering. More... | |
virtual DVector3 | GetObjectCenter () |
get the center of the object in world space | |
virtual void | SetObjectCenter (const DVector3 &v) |
set the center of the object in world space | |
virtual void | GetFacing3D (Vector3 *pV) |
get object facing: only for object that has a facing property like biped, not bound facing | |
float | GetFacing () |
same as GetYaw and SetYaw get object facing: only for object that has a facing property like biped, not bound facing The object is facing the positive x axis, if facing is 0. | |
void | SetFacing (float fFacing) |
virtual float | GetYaw () |
get object Yaw: is facing the positive x axis, if yaw is 0. | |
virtual void | SetYaw (float fFacing) |
virtual float | GetPitch () |
get object pitch: is facing the positive x axis, if yaw is 0. | |
virtual void | SetPitch (float fFacing) |
virtual float | GetRoll () |
get object roll: is facing the positive x axis, if yaw is 0. | |
virtual void | SetRoll (float fFacing) |
virtual void | GetOBB (CShapeOBB *obb) |
get the oriented bounding box in world space. More... | |
virtual void | GetAABB (CShapeAABB *aabb) |
virtual void | SetAABB (const Vector3 *vMin, const Vector3 *vMax) |
Set local AABB information. More... | |
virtual Vector3 | GetLocalAABBCenter () |
virtual void | SetTransform (Matrix4 *pLocalTransform, const DVector3 &pGlobalPos, float *pRotation) |
Set a local transform matrix, a global position and a facing value, according to which the object will be transformed on demand, so that the transformed object can be used for efficient object-level view culling in ParaEngine. More... | |
virtual void | SetTransform (Matrix4 *pWorldTransform) |
virtual Matrix4 * | GetRenderMatrix (Matrix4 &out, int nRenderNumber=0) |
return the world matrix of the object for rendering More... | |
virtual Matrix4 * | GetWorldTransform (Matrix4 &pOut, int nRenderNumber=0) |
get world transform | |
virtual bool | TestCollisionSphere (const Vector3 *pvCenter, float radius, BYTE nMethod=1) |
– collision detection More... | |
virtual bool | TestCollisionSphere (CBaseCamera *pCamera, float fFarPlaneDistance) |
assume that the object is a sphere, it will return false if the sphere is completely out of the 6 frustum planes of the camera More... | |
virtual bool | TestShadowSweptSphere (CBaseCamera *pCamera, const Vector3 *pvDirection) |
assume that the object is a sphere, it will return false if the swept sphere along the given direction is completely out of the 6 frustum planes of the camera this function is usually used to test whether we need to render this object as shadow caster, where pvDirection is the current sun direction. | |
virtual bool | TestCollision (CBaseCamera *pCamera) |
check if the object's original shape can be seen via a camera. More... | |
virtual bool | TestCollisionObject (IViewClippingObject *pObj) |
desc: test if the object collide with this object in the world view. More... | |
virtual bool | TestCollisionRay (const Vector3 &vPickRayOrig, const Vector3 &vPickRayDir, float *fDistance) |
Desc: Check the ray intersection with the object input:vPickRayOrig,vPickRayDir: mouse ray params output: fDistance: the distance between the eye and the intersection point. More... | |
virtual float | GetSphereCollisionDepth (Vector3 *pvCenter, float radius, bool bSolveDepth=false) |
desc: this is similar to TestCollisionSphere, but does more than that. More... | |
virtual float | GetObjectCollisionDepth (IViewClippingObject *pObj) |
desc: test if the circle in the y=0 plane collide with this object in the world view Note: radius can be zero. More... | |
virtual float | GetObjectToPointDistance (const Vector3 *pPoint) |
get the distance from the object's surface to a given point. More... | |
virtual void | DrawBoundingBox (SceneState *sceneState, DWORD color) |
debugging only: draw bounding box | |
virtual void | DrawOcclusionObject (SceneState *sceneState) |
draw the occlusion object More... | |
virtual void | DebugDraw (IBatchedElementDraw *pDebugDraw) |
this function is called whenever debugging drawing is enabled. More... | |
![]() | |
virtual const std::string & | GetIdentifier () |
get the name or identifier. More... | |
virtual void | SetIdentifier (const std::string &sID) |
int | GetNameW (std::u16string &out) |
gets the unicode name | |
const std::string & | GetName () |
alias name for GetIdentifier | |
IRefObject * | GetRefObjectByName (const char *sName) |
RefListItem * | GetRefObjectByTag (int nTag) |
get the first reference object by its tag | |
bool | HasReferences () |
RefResult | AddReference (IRefObject *maker, int nTag=0) |
add a new reference. More... | |
RefResult | DeleteReference (IRefObject *ref) |
delete a reference. More... | |
RefResult | DeleteAllRefs () |
Deletes all references of this object. More... | |
int | DeleteAllRefsByTag (int nTag=0) |
Deletes all references whose tag is nTag of this object. More... | |
RefList & | GetRefList () |
get the ref list | |
int | GetRefObjNum () |
get the total number of references | |
RefListItem * | GetRefObject (int nIndex) |
get the referenced object at the given index. More... | |
virtual void | OnRefAdded (IRefObject *rm, int nTag=0) |
This is called after another object added this object to its reference list. More... | |
virtual void | OnRefDeleted (IRefObject *rm) |
This is called after another object deleted this object from its reference list. More... | |
![]() | |
ATTRIBUTE_METHOD1 (IAttributeFields, GetName_s, const char **) | |
ATTRIBUTE_METHOD1 (IAttributeFields, SetName_s, const char *) | |
ATTRIBUTE_METHOD (IAttributeFields, PrintObject_s) | |
ATTRIBUTE_METHOD (IAttributeFields, AddRef_s) | |
ATTRIBUTE_METHOD1 (IAttributeFields, GetRefCount_s, int *) | |
ATTRIBUTE_METHOD1 (IAttributeFields, SetTime_s, int) | |
ATTRIBUTE_METHOD1 (IAttributeFields, GetTime_s, int *) | |
ATTRIBUTE_METHOD (IAttributeFields, Release_s) | |
virtual bool | IsModified () |
whether some of the fields are modified.It is up to the implementation class to provide this functionality if necessary. More... | |
virtual void | SetModified (bool bModified) |
set whether any field has been modified. More... | |
virtual bool | ValidateFields () |
validate all fields and return true if validation passed. More... | |
virtual string | GetValidationMessage () |
get the recent validation message due to the most recent call to ValidateFields() | |
virtual bool | ResetField (int nFieldID) |
Reset the field to its initial or default value. More... | |
virtual bool | InvokeEditor (int nFieldID, const std::string &sParameters) |
Invoke an (external) editor for a given field. More... | |
virtual int | GetTime () |
get the current local time in case it is animated in milli seconds frames. More... | |
virtual void | SetTime (int nTime) |
virtual CDynamicAttributeField * | GetDynamicField (const std::string &sName) |
Get a dynamic field with a given name. More... | |
virtual CDynamicAttributeField * | GetDynamicField (int nIndex) |
Get a dynamic field with a given index. More... | |
virtual const char * | GetDynamicFieldNameByIndex (int nIndex) |
get field name by index | |
virtual int | GetDynamicFieldCount () |
how many dynamic field this object currently have. More... | |
virtual int | SetDynamicField (const std::string &sName, const CVariable &value) |
set a dynamic field with a given name. More... | |
virtual int | AddDynamicField (const std::string &sName, ATTRIBUTE_FIELDTYPE dwType) |
add dynamic field and return field index | |
virtual void | RemoveAllDynamicFields () |
remove all dynamic fields | |
virtual int | SaveDynamicFieldsToString (std::string &output) |
save only text dynamic fields to fieldname = value text strings. More... | |
virtual int | LoadDynamicFieldsFromString (const std::string &input) |
load only text dynamic fields from string More... | |
CAttributeClass * | GetAttributeClass () |
get the main attribute class object. More... | |
void | PrintObject () |
print the content of this object to a text file at temp/doc/[ClassName].txt. More... | |
![]() | |
virtual void | Clone (IObject *obj) const |
Clone the object's contains to a pointer. More... | |
virtual IObject * | Clone () const |
Clone the object's contains and return a pointer to the newly created object. More... | |
virtual bool | Equals (const IObject *obj) const |
Compare the object with another object. More... | |
virtual const IType * | GetType () const |
virtual std::string | ToString () const |
WeakPtr_type & | GetWeakReference () |
get weak reference object. More... | |
virtual int | ProcessObjectEvent (const ObjectEvent &event) |
this function is only used to backward compatibility of ParaObject:AddEvent() function. More... | |
![]() | |
void | addref () const |
add reference count of the object. More... | |
bool | delref () const |
decrease reference count of the object. More... | |
int | GetRefCount () const |
get the reference count | |
virtual int | Release () |
CRefCounted * | AddToAutoReleasePool () |
addref and releases the ownership sometime soon automatically (usually at the end of the current frame). More... | |
![]() | |
void | SetHeadOnText (const char *sText, int nIndex=0) |
set the text to be displayed on head on display | |
const char * | GetHeadOnText (int nIndex=0) |
Get the text to be displayed on head on display. | |
void | SetHeadOnUITemplateName (const char *sUIName, int nIndex=0) |
set which UI control the head on display will be used as a template for drawing the text it can be a single CGUIText Object or it can be a container with a direct children called "text" if this is "" or empty, the default UI template will be used. More... | |
const char * | GetHeadOnUITemplateName (int nIndex=0) |
get which UI control the head on display will be used as a template for drawing the text it can be a single CGUIText Object or it can be a container with a direct children called "text" if this is "" or empty, the default UI template will be used. More... | |
const std::string & | GetHeadOnUITemplateNameS (int nIndex=0) |
virtual CGUIBase * | GetHeadOnUIObject (int nIndex=0) |
void | SetHeadOnTextColor (DWORD color, int nIndex=0) |
set the text to be displayed on head on display | |
DWORD | GetHeadOnTextColor (int nIndex=0) |
Get the text to be displayed on head on display. | |
void | SetHeadOnOffest (const Vector3 &vOffset, int nIndex=0) |
set the offset where head on display should be rendered relative to the origin or head of the host 3d object | |
void | GetHeadOnOffset (Vector3 *pOut, int nIndex=0) |
Get the offset where head on display should be rendered relative to the origin or head of the host 3d object. | |
void | ShowHeadOnDisplay (bool bShow, int nIndex=0) |
show or hide object's head on display | |
bool | IsHeadOnDisplayShown (int nIndex=0) |
whether the object head on display shall be visible | |
bool | IsHeadOnZEnabled (int nIndex=0) |
whether z buffer test is enabled for Head On display. More... | |
void | SetHeadOnZEnabled (bool bZnabled, int nIndex=0) |
set if z buffer test is enabled for Head On display. More... | |
virtual bool | HasHeadOnDisplay (int nIndex=0) |
whether the object contains head on display at given index | |
bool | IsHeadOn3DScalingEnabled (int nIndex=0) |
Enable 3d scaling. More... | |
void | SetHeadOn3DScalingEnabled (bool bZnabled, int nIndex=0) |
Enable 3d scaling. | |
bool | IsHeadOnUseGlobal3DScaling (int nIndex=0) |
this is only used when m_bEnable3DScaling. More... | |
void | SetHeadOnUseGlobal3DScaling (bool bZnabled, int nIndex=0) |
this is only used when m_bEnable3DScaling. More... | |
void | SetHeadOnNearZoomDist (float fValue, int nIndex=0) |
float | GetHeadOnNearZoomDist (int nIndex=0) |
void | SetHeadOnFarZoomDist (float fValue, int nIndex=0) |
float | GetHeadOnFarZoomDist (int nIndex=0) |
void | SetHeadOnMinUIScaling (float fValue, int nIndex=0) |
float | GetHeadOnMinUIScaling (int nIndex=0) |
void | SetHeadOnMaxUIScaling (float fValue, int nIndex=0) |
float | GetHeadOnMaxUIScaling (int nIndex=0) |
void | SetHeadOnAlphaFadePercentage (float fValue, int nIndex=0) |
float | GetHeadOnAlphaFadePercentage (int nIndex=0) |
void | SetHeadOn3DFacing (float fValue, int nIndex=0) |
turn on 3d facing when this function is called | |
float | GetHeadOn3DFacing (int nIndex=0) |
![]() | |
virtual bool | AddScriptCallback (int func_type, const string &script_func) |
add a new call back handler. More... | |
virtual ScriptCallback * | GetScriptCallback (int func_type) |
return NULL if there is no associated script. More... | |
virtual bool | RemoveScriptCallback (int func_type) |
remove a call back handler | |
![]() | |
virtual int | devType () const |
bool | paintingActive () const |
int | width () const |
int | height () const |
int | depth () const |
virtual float | GetUIScalingX () const |
virtual float | GetUIScalingY () const |
virtual float | GetViewportLeft () const |
virtual float | GetViewportTop () const |
![]() | |
virtual void | SetShadow (bool bRenderShadow) |
whether render shadow | |
virtual float | GetShadowRadius () |
whether render shadow | |
virtual bool | IsShadowMapEnabled () |
whether render using shadow map | |
virtual CBaseObject * | GetGlobalObject (const std::string &sName) |
get the global object by its name. More... | |
Additional Inherited Members | |
![]() | |
static CBaseObject * | GetObjectByID (int nID) |
GetObject By ID. More... | |
![]() | |
static HRESULT | GetAttributeClassID_s (IAttributeFields *cls, int *p1) |
static HRESULT | GetAttributeClassName_s (IAttributeFields *cls, const char **p1) |
static bool | OpenWithDefaultEditor (const char *sFilename, bool bWaitOnReturn=false) |
Open a given file with the default registered editor in the game engine. More... | |
![]() | |
static bool | DrawHeadOnUI (CBaseObject *pObj, int &nCounter, SceneState *pSceneState=NULL, CGUIText **ppObjUITextDefault=NULL, bool bZEnablePass=true, bool b3DTextPass=false) |
draw the headon UI of a specified object. More... | |
static bool | BeginPaint (SceneState *pSceneState, bool b3DTextPass, bool bZEnablePass) |
HeadOn UI needs to be drawn between BeginPaint and EndPaint, which is usually automatically when the first and last head on UI is called. More... | |
static void | EndPaint (SceneState *pSceneState, bool b3DTextPass) |
![]() | |
virtual CAttributeClass * | CreateAttributeClass () |
initialize fields | |
virtual CDynamicAttributesSet * | GetDynamicAttributes (bool bCreateIfNotExist=false) |
![]() | |
virtual void | initPainter (CPainter *painter) const |
virtual CPainter * | sharedPainter () const |
![]() | |
bool | m_bInitialized |
bool | m_bPersistentRenderTarget |
int | m_nTextureWidth |
int | m_nTextureHeight |
int | m_nLifeTime |
DWORD | m_depthStencilFormat |
asset_ptr< TextureEntity > | m_pCanvasTexture |
render target | |
D3DVIEWPORT9 | m_oldViewport |
Vector3 | m_vOldRenderOrigin |
DWORD | m_dwClearColor |
used when clearing background color | |
bool | m_bIsBegin |
bool | m_bActiveRendering |
if true, contents will be drawn to the current render target each frame. More... | |
bool | m_bIsDirty |
whether render target is dirty and should be redraw on the next frame. More... | |
std::string | m_sCanvasTextureName |
render target canvas name | |
CPaintEngine * | engine |
![]() | |
int | m_nID |
the ID of the object. More... | |
DWORD | m_dwAttribute |
volume type and attribute of this object. More... | |
CChildObjectList_Type | m_children |
child objects array: we keep strong references (ref counted) to child objects | |
ObjectType | m_objType |
type of the object | |
CTerrainTile * | m_tileContainer |
int32 | m_nTechniqueHandle |
the primary technique handle | |
int32 | m_nFrameNumber |
the frame number that this object is last accessed. More... | |
int32 | m_nSelectGroupIndex |
this is the selection group index. More... | |
int32 | m_nRenderImportance |
the larger, the more important. More... | |
float | m_fRenderOrder |
0 if automatic, larger number renders after smaller numbered object. More... | |
float | m_fRenderDistance |
we will not render this object if the object's position to camera eye position is further than this value. More... | |
CParameterBlock * | m_pEffectParamBlock |
effect param block that should be applied to m_nTechniqueHandle | |
bool | m_bGeometryDirty: 1 |
whether the shape of the object is dirty, such as model, size, facing, local transform is changed. More... | |
bool | m_bEnableLOD: 1 |
whether to enable lod if there is lod. More... | |
![]() | |
RefList | m_references |
This is the list of active references that refer to us. | |
std::string | m_sIdentifer |
unit name used in the scripting language | |
![]() | |
WeakPtr_type | m_weak_reference |
![]() | |
int | m_refcount |
![]() | |
ObjectCallbackPool_Type | m_callback_scripts |
the NPL script handlers | |
![]() | |
int32 | painters |
refcount | |
![]() | |
static int | g_nObjectSelectionEffect = ParaEngine::RenderSelectionStyle_border |
enum of RenderSelectionStyle More... | |
Mini scene graph does not use a spatial partitions for its stored objects, instead it just implement a simple parent/child relationships.
Most scene objects can be attached to mini scene graph. We can add and delete, show or hide objects just like the 2D objects. Contents on mini scene graphs are rendered after the main scene is rendered. Mini scene graph is so designed that it can be used to display interactive 3D helper objects in the scene. In most cases, we will want to keep only a small number of objects on a visible mini scene graph node. For example, some rotation handles or attachment points on mesh or helper 3D handles can be created and displayed via mini scene graph. Objects on mini scene graph are not persistent, so they are usually used to display temporary 3D objects. Following is a list of possible usage of mini scene graph
CMiniSceneGraph::CMiniSceneGraph | ( | void | ) |
set fog
turn on sky rendering, if there is any available sky meshes
void ParaEngine::CMiniSceneGraph::CameraPan | ( | float | dx, |
float | dy | ||
) |
pan the camera
dx | relative amount in pixels |
dy | relative amount in pixels |
void ParaEngine::CMiniSceneGraph::CameraRotate | ( | float | dx, |
float | dy, | ||
float | dz | ||
) |
rotate the camera round the object on canvas
dx | |
dy | relative amount in radian. |
dz |
void ParaEngine::CMiniSceneGraph::CameraSetEyePosByAngle | ( | float | fRotY, |
float | fLiftupAngle, | ||
float | fCameraObjectDist | ||
) |
set the camera eye position
fRotY | rotation of the camera around the Y axis, in the world coordinate. |
fLiftupAngle | lift up angle of the camera. |
fCameraObjectDist | the distance from the camera eye to the object being followed. |
void ParaEngine::CMiniSceneGraph::CameraZoom | ( | float | fAmount | ) |
Zoom the camera.
fAmount |
void ParaEngine::CMiniSceneGraph::CameraZoomSphere | ( | const CShapeSphere & | sphere | ) |
reset the camera parameters to view the entire sphere at best (default) distance
sphere |
|
virtual |
bool CMiniSceneGraph::CreateSkyBox | ( | const string & | strObjectName, |
AssetEntity & | MeshAsset, | ||
float | fScaleX, | ||
float | fScaleY, | ||
float | fScaleZ, | ||
float | fHeightOffset | ||
) |
create a sky box and add it to the current list, and select it as the current skybox.
sky box with the same name will not be recreated,but will be selected as the current sky box.
strObjectName | this can be "". return true if succeeded |
bool CMiniSceneGraph::DeleteSkyBox | ( | const string & | strObjectName | ) |
delete a name sky box.
strObjectName | if this is "", all sky boxes will be deleted. |
|
virtual |
Completely destroy child nodes from memory recursively.
This is often called by the root scene at application clean up
Reimplemented from ParaEngine::CBaseObject.
int ParaEngine::CMiniSceneGraph::DestroyObject | ( | const char * | name, |
bool | bRecursive = false |
||
) |
destroy all objects with the given name.
This function will search the scene recursively the current version will only destroy the first met child with the given name.
int ParaEngine::CMiniSceneGraph::DestroyObject | ( | CBaseObject * | pObj | ) |
delete an object from this scene graph but do not destroy it.This function will search the scene recursively this function can be used to move a node from one scene graph to another Note: this is like calling RemoveObject(pObj) and then delete the object.
pObj |
void ParaEngine::CMiniSceneGraph::Draw | ( | float | fDeltaTime | ) |
draw the content of the scene graph to the current render target.
If EnableActiveRendering is enabled, this function will be called each render frame after the main scene graph. however, if EnableActiveRendering is disabled, one can call this function to render a single frame to the render target on demand.
we will allow alpha in render target in case the device support it, if we have fog, the alpha does not take effect.
the actual draw call is here.
|
inlinevirtual |
attribute class ID should be identical, unless one knows how overriding rules work.
Reimplemented from ParaEngine::CBaseObject.
|
virtual |
Get the color of the scene ground when it is not enabled.When scene is enabled, the background color is always the fog color.
Implements ParaEngine::IScene.
CCanvasCamera * CMiniSceneGraph::GetCamera | ( | ) |
get the camera object.
create if the camera does not exist.
CSkyMesh * CMiniSceneGraph::GetCurrentSky | ( | ) |
return NULL if no sky defined.
CBaseObject * ParaEngine::CMiniSceneGraph::GetObject | ( | const char * | name, |
bool | bRecursive = false |
||
) |
get object by name, if there are multiple objects with the same name, the last added one is inserted.
name | |
bRecursive | true to search recursively(may be slow). default to false. false only search the first level child from a fast hash map. |
CBaseObject * ParaEngine::CMiniSceneGraph::GetObject | ( | float | x, |
float | y, | ||
float | z, | ||
float | fEpsilon = 0.01f |
||
) |
get the first object that matches the position.
fEpsilon is 0.01f by default
|
virtual |
get the render origin in the rendering coordinate system.rendering coordinate system is a 3D coordinate system parallel to the world coordinate system, but with a different origin called render origin.Render origin is an arbitrary 3D point chosen near the current camera eye position.
All scene objects and the camera view are transformed to the rendering coordinate system for rendering. This is because if we use the world coordinate system for rendering, the components of transform matrix that is used for object manipulation will be inconsistent (i.e. of different magnitudes.) By doing so, it will correct floating point calculation imprecisions, due to large numbers in object's coordinates, such as the simple addition of (20000.01f+0.01234f). The result of using world coordinate system for rendering is that we will get increasingly jerky object on screen as its global position shifts away from the origin of the world coordinate system.(this is usually the case for games with a very large map. One may consider using double type to store the global position of scene object in world units.) In the rendering coordinate system, however, all components in the matrix will be comparatively small and consistent. Hence objects can be positioned more precisely near the render origin, which is near the camera eye position.
Implements ParaEngine::IScene.
int ParaEngine::CMiniSceneGraph::GetRenderPipelineOrder | ( | ) |
default to PIPELINE_3D_SCENE.
please see RENDER_PIPELINE_ORDER enum type
|
inlinevirtual |
get the scene state information.
The scene state contains information about the current simulation and render states.Such as which scene object is being animated or rendered, etc
Implements ParaEngine::IScene.
|
virtual |
|
virtual |
this class should be implemented if one wants to add new attribute.
This function is always called internally.
Reimplemented from ParaEngine::CRenderTarget.
bool ParaEngine::CMiniSceneGraph::IsCameraEnabled | ( | ) |
whether camera is enabled.
A dedicated render target for this miniscenegraph will be automatically created when the scene graph claims to enable its own camera. the render target size should be set before calling this function at SetRenderTargetSize(). it is disabled by default. it is much faster to disable camera, because it will use the main scene's render pipeline and effects. Otherwise it will be rendered after the main scene is rendered, since the camera is different. TODO: currently mini scene graph is only rendered when its camera is disabled. local camera is not supported at the moment
bool CMiniSceneGraph::IsNeedUpdate | ( | ) |
even when active rendering is on, the mini scene graph will not update itself, if need update is false.
Need update will be set to true whenever GetTexture is called. and that whenever draw method is called. Need update will become false.
bool ParaEngine::CMiniSceneGraph::PickObject | ( | const CShapeRay & | ray, |
CBaseObject ** | pTouchedObject, | ||
float | fMaxDistance = 0 , |
||
OBJECT_FILTER_CALLBACK | pFnctFilter = NULL |
||
) |
add all children
For any potentially visible objects in the queue, perform further object-level clipping test, and draw them if the test passes.
if no rough test is performed, further cull object with the camera's view frustum.
push its child objects to the queue
|
virtual |
this function is called at the beginning of each frame to build the scene state from the specified camera Objects which are potentially visible are put to predefined queues of the scene states.
sort by the camera-object distance: front to back.
sort by the camera-object distance: back to front
for transparent objects
sort by the primary asset : in this case it's MA from front to back.
Reimplemented from ParaEngine::CRenderTarget.
|
virtual |
decide whether pObj is visible by the pCamera, if so, it will add it to the proper render queue in sceneState.
if no rough test is performed, further cull object with the camera's view frustum.
draw this object
To which post rendering list the object goes to. this is only for debugging purposes. the bounding box of object from different render list are drawn using different colors. 0 means biped post rendering list. 1 means solid object rendering list. 2 means transparent or small rendering list.
for ordinary mesh objects, we will check its distance from the camera eye to its surface. if
if the mesh is very near the camera, or it has a very big view angle, we will draw it as solid mesh,
push its child objects to the queue
Reimplemented from ParaEngine::IScene.
int ParaEngine::CMiniSceneGraph::RemoveObject | ( | const char * | name, |
bool | bRecursive = false |
||
) |
remove an object from this scene graph but do not destroy it.
This function will search the scene recursively this function can be used to move a node from one scene graph to another
int CMiniSceneGraph::RenderHeadOnDisplay | ( | ) |
render the head on display, return the number of objects rendered
– Draw all characters' head on display including the player itself.
int CMiniSceneGraph::RenderSelection | ( | DWORD | dwSelection = 0xffffffff , |
double | dTimeDelta = 0 |
||
) |
render objects in the post rendering list.
This function can be called to render to texture render targets if multiple objects are in selection, it will draw them in internally preferred order. it will assume that the camera and world transform has already been set. It will just call the render method of respective scene objects.
dwSelection | any bit combination of RENDER_GROUP, default is render all scene object. |
draw solid object rendering list from front to back.
– Draw all characters including the player itself.
sort by the primary asset : in this case it's MA
for globally un-updated instances, animate the remaining particles
for local un-updated instances, delete the instance.
for globally updated instances, just draw it.
for local updated instances, ignore it, since it has already been draw with the model to which it is attached.
void CMiniSceneGraph::SetActor | ( | CBaseObject * | pActor | ) |
set the actor: The camera always focuses on actor, so this actor can be used to control the current camera position.
pActor | it must be a valid object. |
|
virtual |
set the color of the scene ground when it is not enabled.When scene is enabled, the background color is always the fog color.
Implements ParaEngine::IScene.
void CMiniSceneGraph::SetMaskTexture | ( | TextureEntity * | pTexture | ) |
this is an optional 2D mask, which is drawn over the entire canvas after scene is rendered in to it.
pTexture |
void ParaEngine::CMiniSceneGraph::SetName | ( | const char * | sName | ) |
set the object name.
this function can be used to rename this object
void ParaEngine::CMiniSceneGraph::SetRenderPipelineOrder | ( | int | nOrder | ) |
default to PIPELINE_3D_SCENE.
please see RENDER_PIPELINE_ORDER enum type