2 #include "TileObject.h" 7 class CViewCullingObject;
16 virtual CBaseObject::_SceneObjectType GetType(){
return CBaseObject::MeshObject;};
29 virtual void Rotate(
float x,
float y,
float z);
103 ATTRIBUTE_METHOD1(
CMeshObject, IsFaceCullingDisabled_s,
bool*) {*p1 = cls->IsFaceCullingDisabled();
return S_OK;}
104 ATTRIBUTE_METHOD1(
CMeshObject, SetFaceCullingDisabled_s,
bool) {cls->SetFaceCullingDisabled(p1);
return S_OK;}
108 virtual HRESULT InitDeviceObjects();
109 HRESULT RestoreDeviceObjects();
110 HRESULT InvalidateDeviceObjects();
114 virtual void Animate(
double dTimeDelta,
int nRenderNumber=0 );
289 bool SetParamsFromAsset();
299 vector< asset_ptr<TextureEntity> > m_ReplaceableTextures;
virtual float GetCtorPercentage()
Get the object construction percentage (progress) in the range[0,1].
Definition: MeshObject.cpp:81
Which DXT Compression to Use? Obviously, there are some trade-offs between the different formats whic...
Definition: TextureEntity.h:29
bool m_XRefSearched
whether we have searched the XRef object, we will use late evaluation and only load XRef when they ar...
Definition: MeshObject.h:333
bool m_bViewClippingUpdated
whether view clipping object should be updated.
Definition: MeshObject.h:330
Vector3 GetXRefScriptPosition(int nIndex)
get the 3D position in world space of the script object's origin
Definition: MeshObject.cpp:1033
virtual const char * GetAttributeClassName()
a static string, describing the attribute class object's name
Definition: MeshObject.h:97
3-dimensional vector with double precision.
Definition: ParaDVector3.h:17
an attribute class is a collection of attribute fields.
Definition: AttributeClass.h:10
const char * GetXRefScriptLocalMatrix(int nIndex)
get the local transform of the script object.
Definition: MeshObject.cpp:1158
It's used as parameter to Draw method of each scene object.
Definition: SceneState.h:284
const char * GetXRefScript(int nIndex)
return xref script file path by index
Definition: MeshObject.cpp:1008
It is used for object-level view culling.
Definition: ViewCullingObject.h:16
int GetXRefInstanceCount()
get the number of the animation X reference instances
Definition: MeshObject.cpp:976
void SetFaceCullingDisabled(bool bDisableFaceCulling)
whether we will turn off any material level face culling setting.
Definition: MeshObject.cpp:1297
Pure interface for CBaseObject (3D scene object) It defines basic shapes and collision detection...
Definition: IViewClippingObject.h:29
virtual TextureEntity * GetDefaultReplaceableTexture(int ReplaceableTextureID)
get the default replaceable texture by its ID.
Definition: MeshObject.cpp:1208
base class for all xref objects
Definition: XRefObject.h:13
float m_fCtorPercentage
construction progress of the mesh
Definition: MeshObject.h:308
virtual float GetScaling()
get scaling
Definition: MeshObject.cpp:390
virtual void Animate(double dTimeDelta, int nRenderNumber=0)
animate the model by a given delta time.
Definition: MeshObject.cpp:1254
different physics engine has different winding order.
Definition: EventBinding.h:32
virtual IViewClippingObject * GetViewClippingObject()
return the view clipping object used for object-level clipping when rendering this object...
Definition: MeshObject.cpp:276
bool m_bIsTransparent
whether the object contains transparent material.
Definition: MeshObject.h:321
virtual void SetAnimation(int nAnimID)
Set the current animation id.
Definition: MeshObject.cpp:909
virtual void Cleanup()
clean up the object.
Definition: MeshObject.cpp:271
void SearchXRefObject()
search the associated mesh entity for any XReference object
Definition: MeshObject.cpp:850
virtual bool IsUseGlobalTime()
whether to use global time to sync animation.
Definition: MeshObject.cpp:970
virtual const char * GetAttributeClassDescription()
a static string, describing the attribute class object
Definition: MeshObject.h:99
Implementation of a Quaternion, i.e.
Definition: ParaQuaternion.h:10
virtual void GetRotation(Quaternion *quat)
get rotation using a quaternion
Definition: MeshObject.cpp:355
the sky object in the scene.
Definition: SkyMesh.h:13
virtual void SetRotation(const Quaternion &quat)
set rotation using a quaternion.
Definition: MeshObject.cpp:342
void CleanupXRefInstances()
remove and clean up all anim xref references
Definition: MeshObject.cpp:70
Standard 3-dimensional vector.
Definition: ParaVector3.h:16
HRESULT InitObject(MeshEntity *ppMesh, TextureEntity *ppTexture, Vector3 vPos)
Desc: It saves device references, but do not initialize those devices.
Definition: MeshObject.cpp:99
virtual void SetScaling(float s)
set the scale of the object.
Definition: MeshObject.cpp:378
asset_ptr< TextureEntity > m_ppTexture
texture
Definition: MeshObject.h:305
float GetXRefScriptFacing(int nIndex)
get the facing of the object in xz plane
Definition: MeshObject.cpp:1107
static mesh scene object.
Definition: MeshObject.h:13
bool m_bIsPersistent
whether it is persistent in the world.
Definition: MeshObject.h:338
int m_nAnimFrame
animation frame for xref animated object.
Definition: MeshObject.h:314
virtual void SetTransparent(bool bIsTransparent)
Set whether the object is transparent.
Definition: MeshObject.h:163
virtual Matrix4 * GetRenderMatrix(Matrix4 &out, int nRenderNumber=0)
return the world matrix of the object for rendering
Definition: MeshObject.cpp:406
asset_ptr< MeshEntity > m_ppMesh
mesh geometry
Definition: MeshObject.h:298
virtual int GetAnimFrame()
get the current animation frame number relative to the beginning of current animation.
Definition: MeshObject.cpp:946
Matrix4 m_mxLocalTransform
mesh local world xform: center in the origin
Definition: MeshObject.h:295
void ForceNoLight(bool bNoLight)
whether force rendering without local or global lighting effect.
Definition: MeshObject.cpp:840
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: ParaMatrix4.h:23
virtual bool IsPersistent()
whether the object is persistent in the world.
Definition: MeshObject.cpp:1287
virtual int GetAnimation()
get the scaling.
Definition: MeshObject.cpp:922
virtual int GetAttributeClassID()
attribute class ID should be identical, unless one knows how overriding rules work.
Definition: MeshObject.h:95
HRESULT DrawInner(SceneState *sceneState, const Matrix4 *pMxWorld=0, float fCameraToObjectDist=0.f, CParameterBlock *materialParams=NULL)
it is the same as draw, except that it will use the current transform, instead of applying by the mes...
Definition: MeshObject.cpp:441
virtual void SetUseGlobalTime(bool bUseGlobalTime)
whether to use global time to sync animation.
Definition: MeshObject.cpp:958
vector< XRefObject * > m_XRefObjects
xref animation instances in the model.
Definition: MeshObject.h:302
A static mesh based physical object in the scene please note that it keeps the static mesh object as ...
Definition: MeshPhysicsObject.h:16
MeshEntity distinguish one template from other.
Definition: MeshEntity.h:38
virtual bool ViewTouch()
this function is called, when the object is in view range.
Definition: MeshObject.cpp:1271
bool m_bUseGlobalTime
whether to use global time for all animation.
Definition: MeshObject.h:317
int m_nAnimID
animation id for xref animated object.
Definition: MeshObject.h:311
Tile Object have position and bounding rect and can usually be attached to quad-tree terrain tile...
Definition: TileObject.h:10
int GetXRefScriptCount()
get the number of the script X reference instances
Definition: MeshObject.cpp:987
virtual bool SetReplaceableTexture(int ReplaceableTextureID, TextureEntity *pTextureEntity)
set the replaceable texture at the given index with a new texture.
Definition: MeshObject.cpp:1242
virtual HRESULT Draw(SceneState *sceneState)
Desc: Render this instance using the current settings.
Definition: MeshObject.cpp:772
virtual TextureEntity * GetReplaceableTexture(int ReplaceableTextureID)
get the current replaceable texture by its ID.
Definition: MeshObject.cpp:1219
virtual Matrix4 * GetAttachmentMatrix(Matrix4 &pOut, int nAttachmentID=0, int nRenderNumber=0)
Get the specified attachment matrix of the current model.
Definition: MeshObject.cpp:891
virtual int GetNumReplaceableTextures()
get the total number of replaceable textures, which is the largest replaceable texture ID...
Definition: MeshObject.cpp:1197
virtual void Rotate(float x, float y, float z)
Rotate the object.This only takes effects on objects having 3D orientation, such as static mesh and p...
Definition: MeshObject.cpp:363
virtual int InstallFields(CAttributeClass *pClass, bool bOverride)
this class should be implemented if one wants to add new attribute.
Definition: MeshObject.cpp:1307
virtual void SetLocalTransform(const Matrix4 &mXForm)
set local transform directly
Definition: MeshObject.cpp:302
bool m_bForceNoLight
force rendering without local or global lighting effect.
Definition: MeshObject.h:324
virtual void SetPosition(const DVector3 &v)
always bottom center of the bounding shape
Definition: MeshObject.cpp:1149
virtual AssetEntity * GetPrimaryAsset()
Set scaling.
Definition: MeshObject.h:142
virtual void SetPersistent(bool bPersistent)
whenever a persistent object is made non-persistent, the SaveToDB() function will actually removed it...
Definition: MeshObject.cpp:1292
virtual bool IsTransparent()
whether the object contains transparent material.
Definition: MeshObject.h:157
virtual void SetCtorPercentage(float fPercentage)
Set the object construction percentage (progress) in the range[0,1].
Definition: MeshObject.cpp:86
virtual bool HasAlphaBlendedObjects()
return true if the object contains alpha blended render pass.
Definition: MeshObject.cpp:1316
bool IsFaceCullingDisabled()
whether we will turn off any material level face culling setting.
Definition: MeshObject.cpp:1302
virtual void GetLocalTransform(Matrix4 *localTransform)
get local transform
Definition: MeshObject.cpp:326
Vector3 GetXRefScriptScaling(int nIndex)
get the scaling of the object in both x,y,z directions
Definition: MeshObject.cpp:1066
virtual void Reset()
reset the object to its default settings.
Definition: MeshObject.cpp:400
bool IsNoLight()
Definition: MeshObject.cpp:845
Base class for managed asset entity in ParaEngine.
Definition: AssetEntity.h:25
bool m_bDisableFaceCulling
if true, we will disable facing culling when rendering the object.
Definition: MeshObject.h:327
virtual void SetAnimFrame(int nFrame)
set the current animation frame number relative to the beginning of current animation.
Definition: MeshObject.cpp:934
XRefObject * GetXRefInstanceByIndex(int nIndex)
return animation xref instance by index
Definition: MeshObject.cpp:982
a list of CParameter{name, value} pairs of anything.
Definition: ParameterBlock.h:108