DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
Cloud Backup
True Drop Box
FTP/SFTP Hosting
Group Account
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Online Backup Tool
|
Cloud-to-Cloud Backup
FTP, Email & Web Service
FTP Home
|
FTP Hosting FAQ
|
Email Hosting
|
EmailManager
|
Web Hosting
Help & Resources
About
|
Enterprise Service
|
Partnership
|
Comparisons
|
Support
Quick Links
Security and Privacy
Download Software
Service Manual
Use Cases
Group Account
Online Help
Blog
Contact
Cloud Surveillance
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
IP Camera & DVR Solution
More...
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
More...
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
/* ----------------------------------------------------------------------------- This source file is part of OGRE (Object-oriented Graphics Rendering Engine) For the latest info, see http://www.ogre3d.org/ Copyright (c) 2000-2006 Torus Knot Software Ltd Also see acknowledgements in Readme.html This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA, or go to http://www.gnu.org/copyleft/lesser.txt. You may alternatively use this source under the terms of a specific version of the OGRE Unrestricted License provided you have obtained such a license from Torus Knot Software Ltd. ----------------------------------------------------------------------------- */ #ifndef __SubEntity_H__ #define __SubEntity_H__ #include "OgrePrerequisites.h" #include "OgreString.h" #include "OgreRenderable.h" #include "OgreHardwareBufferManager.h" namespace Ogre { /** Utility class which defines the sub-parts of an Entity. @remarks Just as meshes are split into submeshes, an Entity is made up of potentially multiple SubMeshes. These are mainly here to provide the link between the Material which the SubEntity uses (which may be the default Material for the SubMesh or may have been changed for this object) and the SubMesh data. @par The SubEntity also allows the application some flexibility in the material properties for this section of a particular instance of this Mesh, e.g. tinting the windows on a car model. @par SubEntity instances are never created manually. They are created at the same time as their parent Entity by the SceneManager method createEntity. */ class _OgreExport SubEntity: public Renderable { // Note no virtual functions for efficiency friend class Entity; friend class SceneManager; protected: /** Private constructor - don't allow creation by anybody else. */ SubEntity(Entity* parent, SubMesh* subMeshBasis); /** Private destructor. */ virtual ~SubEntity(); /// Pointer to parent. Entity* mParentEntity; /// Name of Material in use by this SubEntity. String mMaterialName; /// Cached pointer to material. MaterialPtr mpMaterial; // Pointer to the SubMesh defining geometry. SubMesh* mSubMesh; /// Is this SubEntity visible? bool mVisible; /// The LOD number of the material to use, calculated by Entity::_notifyCurrentCamera unsigned short mMaterialLodIndex; /// blend buffer details for dedicated geometry VertexData* mSkelAnimVertexData; /// Quick lookup of buffers TempBlendedBufferInfo mTempSkelAnimInfo; /// Temp buffer details for software Vertex anim geometry TempBlendedBufferInfo mTempVertexAnimInfo; /// Vertex data details for software Vertex anim of shared geometry VertexData* mSoftwareVertexAnimVertexData; /// Vertex data details for hardware Vertex anim of shared geometry /// - separate since we need to s/w anim for shadows whilst still altering /// the vertex data for hardware morphing (pos2 binding) VertexData* mHardwareVertexAnimVertexData; /// Have we applied any vertex animation to geometry? bool mVertexAnimationAppliedThisFrame; /// Number of hardware blended poses supported by material ushort mHardwarePoseCount; /// Cached distance to last camera for getSquaredViewDepth mutable Real mCachedCameraDist; /// The camera for which the cached distance is valid mutable const Camera *mCachedCamera; /** Internal method for preparing this Entity for use in animation. */ void prepareTempBlendBuffers(void); public: /** Gets the name of the Material in use by this instance. */ const String& getMaterialName() const; /** Sets the name of the Material to be used. @remarks By default a SubEntity uses the default Material that the SubMesh uses. This call can alter that so that the Material is different for this instance. */ void setMaterialName( const String& name ); /** Tells this SubEntity whether to be visible or not. */ virtual void setVisible(bool visible); /** Returns whether or not this SubEntity is supposed to be visible. */ virtual bool isVisible(void) const; /** Accessor method to read mesh data. */ SubMesh* getSubMesh(void); /** Accessor to get parent Entity */ Entity* getParent(void) const { return mParentEntity; } /** Overridden - see Renderable. */ const MaterialPtr& getMaterial(void) const; /** Overridden - see Renderable. */ Technique* getTechnique(void) const; /** Overridden - see Renderable. */ void getRenderOperation(RenderOperation& op); /** Overridden - see Renderable. */ void getWorldTransforms(Matrix4* xform) const; /** @copydoc Renderable::getWorldOrientation */ const Quaternion& getWorldOrientation(void) const; /** @copydoc Renderable::getWorldPosition */ const Vector3& getWorldPosition(void) const; /** Overridden - see Renderable. */ bool getNormaliseNormals(void) const; /** Overridden - see Renderable. */ unsigned short getNumWorldTransforms(void) const; /** Overridden, see Renderable */ Real getSquaredViewDepth(const Camera* cam) const; /** @copydoc Renderable::getLights */ const LightList& getLights(void) const; /** @copydoc Renderable::getCastsShadows */ bool getCastsShadows(void) const; /** Advanced method to get the temporarily blended vertex information for entities which are software skinned. @remarks Internal engine will eliminate software animation if possible, this information is unreliable unless added request for software animation via Entity::addSoftwareAnimationRequest. @note The positions/normals of the returned vertex data is in object space. */ VertexData* _getSkelAnimVertexData(void); /** Advanced method to get the temporarily blended software morph vertex information @remarks Internal engine will eliminate software animation if possible, this information is unreliable unless added request for software animation via Entity::addSoftwareAnimationRequest. @note The positions/normals of the returned vertex data is in object space. */ VertexData* _getSoftwareVertexAnimVertexData(void); /** Advanced method to get the hardware morph vertex information @note The positions/normals of the returned vertex data is in object space. */ VertexData* _getHardwareVertexAnimVertexData(void); /** Advanced method to get the temp buffer information for software skeletal animation. */ TempBlendedBufferInfo* _getSkelAnimTempBufferInfo(void); /** Advanced method to get the temp buffer information for software morph animation. */ TempBlendedBufferInfo* _getVertexAnimTempBufferInfo(void); /// Retrieve the VertexData which should be used for GPU binding VertexData* getVertexDataForBinding(void); /** Mark all vertex data as so far unanimated. */ void _markBuffersUnusedForAnimation(void); /** Mark all vertex data as animated. */ void _markBuffersUsedForAnimation(void); /** Are buffers already marked as vertex animated? */ bool _getBuffersMarkedForAnimation(void) const { return mVertexAnimationAppliedThisFrame; } /** Internal method to copy original vertex data to the morph structures should there be no active animation in use. */ void _restoreBuffersForUnusedAnimation(bool hardwareAnimation); /** Overridden from Renderble to provide some custom behaviour. */ void _updateCustomGpuParameter( const GpuProgramParameters::AutoConstantEntry& constantEntry, GpuProgramParameters* params) const; /** Invalidate the camera distance cache */ void _invalidateCameraCache () { mCachedCamera = 0; } }; } #endif
OgreSubEntity.h
Page URL
File URL
Prev
196/217
Next
Download
( 8 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.