#include <actorproxy.h>

Public Member Functions | |
| ActorProxy () | |
| Constructs the actor proxy. | |
| const dtCore::UniqueId & | GetId () const |
| Gets the UniqueID object assigned to this actor proxy. | |
| void | SetId (const dtCore::UniqueId &newId) |
| Sets the UniqueID mapped to this actor proxy. | |
| const std::string & | GetName () const |
| Gets the name of the actor proxy. | |
| void | SetName (const std::string &name) |
| Sets the name of this actor proxy. | |
| const std::string & | GetClassName () const |
| Retrieve the class name. | |
| bool | IsInstanceOf (const std::string &name) const |
| Returns if one object is an instance of another. | |
| const std::set< std::string > & | GetClassHierarchy () const |
| Returns an alphabetically ordered list of strings corresponding to the list of ancestor classes from which this derives. | |
| virtual bool | IsGameActorProxy () const |
| This is a shortcut to avoid having to dynamic cast to a GameActorProxy. | |
| void | AddProperty (ActorProperty *newProp) |
| Adds a new property to the this proxy's list of properties. | |
| ActorProperty * | GetProperty (const std::string &name) |
| Gets a property of the requested name. | |
| template<class PropertyType> | |
| void | GetProperty (const std::string &name, PropertyType *&property) |
| Templated version of GetProperty (non-const) that auto casts the property to the desired type. | |
| const ActorProperty * | GetProperty (const std::string &name) const |
| Gets a property of the requested name. | |
| template<class PropertyType> | |
| void | GetProperty (const std::string &name, const PropertyType *&property) const |
| Templated version of GetProperty (const) that auto casts the property to the desired type. | |
| ResourceDescriptor * | GetResource (const std::string &name) |
| Gets a ResourceDescriptor of the requested property name. | |
| const ResourceDescriptor * | GetResource (const std::string &name) const |
| Gets a ResourceDescriptor of the requested property name. | |
| void | SetResource (const std::string &name, ResourceDescriptor *source) |
| Sets a resource in the map. | |
| const ActorProxy * | GetLinkedActor (const std::string &name) const |
| Gets a property of the requested name. | |
| ActorProxy * | GetLinkedActor (const std::string &name) |
| Gets a property of the requested name. | |
| void | SetLinkedActor (const std::string &name, ActorProxy *newValue) |
| Sets an actor proxy in the map. | |
| void | GetPropertyList (std::vector< ActorProperty * > &propList) |
| Gets a list of the properties currently registered for this actor proxy. | |
| void | GetPropertyList (std::vector< const ActorProperty * > &propList) const |
| Gets a const list of the properties currently registered for this actor proxy. | |
| const ActorType & | GetActorType () const |
| Gets the actor type that represents this actor proxy. | |
| dtCore::DeltaDrawable * | GetActor () |
| Gets the actor type that represents this actor proxy. | |
| template<typename TActorPtr> | |
| void | GetActor (TActorPtr &actorType) |
| Templated version of GetActor() that static casts the actor to the type passed in. | |
| const dtCore::DeltaDrawable * | GetActor () const |
| Gets the actor who's properties are modeled by this proxy. | |
| template<typename TActorPtr> | |
| void | GetActor (TActorPtr &actorType) const |
| Templated version of GetActor() const that static casts the actor to the type passed in. | |
| virtual void | SetBillBoardIcon (ActorProxyIcon *icon) |
| Sets the billboard icon used to represent this actor proxy. | |
| virtual ActorProxyIcon * | GetBillBoardIcon () |
| Gets the billboard icon currently assigned to this actor proxy. | |
| virtual const RenderMode & | GetRenderMode () |
| Gets the render mode currently active on this actor proxy. | |
| virtual void | BuildPropertyMap ()=0 |
| This method is called by the actor registry which instructs the proxy to create its properties. | |
| virtual bool | IsPlaceable () const =0 |
| Not all objects are "placeable" in the scene. | |
| virtual bool | IsGhostProxy () const |
| if this returns true, this proxy will not be saved into the map useful for having proxies that own other proxies | |
| virtual void | OnRemove () const |
| Called when this actor is removed from a map. | |
| virtual dtCore::RefPtr < ActorProxy > | Clone () |
| Creates a copy of this actor proxy and returns it. | |
| const bool | IsInSTAGE () const |
| Returns true if called from STAGE. | |
| bool | operator== (const ActorProxy &rhs) const |
| bool | operator!= (const ActorProxy &rhs) const |
Protected Member Functions | |
| void | SetActor (dtCore::DeltaDrawable &actor) |
| Sets the actor on this proxy. | |
| virtual | ~ActorProxy () |
| Keep the destructor protected since we use dtCore::RefPtr to track any object created. | |
| virtual void | CreateActor ()=0 |
| Initializes the actor. | |
| void | SetClassName (const std::string &name) |
| Set the class name. | |
| void | RemoveProperty (const std::string &nameToRemove) |
| Only call from build property map. | |
Protected Attributes | |
| dtCore::RefPtr< ActorProxyIcon > | mBillBoardIcon |
| Each actor proxy may have a billboard associated with it. | |
Friends | |
| class | ActorPluginRegistry |
| Allow access to the ActorPluginRegistry. | |
Classes | |
| class | RenderMode |
| This enumeration defines the different ways an actor proxy can be rendered in the level editor. More... | |
The proxy's main purpose is to expose the attributes of an actor class (or Delta3D object) via a list of properties.
Client-side applications may or may not wish to use the proxy interface for accessing actor objects. However, the actor proxy is the only way to expose actors to the Delta3D Level Editor.
| dtDAL::ActorProxy::ActorProxy | ( | ) |
Constructs the actor proxy.
| dtDAL::ActorProxy::~ActorProxy | ( | ) | [protected, virtual] |
Keep the destructor protected since we use dtCore::RefPtr to track any object created.
| const dtCore::UniqueId & dtDAL::ActorProxy::GetId | ( | ) | const |
Gets the UniqueID object assigned to this actor proxy.
| void dtDAL::ActorProxy::SetId | ( | const dtCore::UniqueId & | newId | ) |
Sets the UniqueID mapped to this actor proxy.
| newId | The new ID. |
| const std::string & dtDAL::ActorProxy::GetName | ( | ) | const |
Gets the name of the actor proxy.
This is actually a wrapper which just returns the name assigned to the underlying actor.
| void dtDAL::ActorProxy::SetName | ( | const std::string & | name | ) |
Sets the name of this actor proxy.
In actuality, this is setting the name of the underlying actor this proxy is holding.
| name | The new name to assign to this actor proxy. |
| const std::string& dtDAL::ActorProxy::GetClassName | ( | ) | const [inline] |
Retrieve the class name.
| bool dtDAL::ActorProxy::IsInstanceOf | ( | const std::string & | name | ) | const [inline] |
Returns if one object is an instance of another.
| name | The name of the object to check against |
| const std::set<std::string>& dtDAL::ActorProxy::GetClassHierarchy | ( | ) | const [inline] |
Returns an alphabetically ordered list of strings corresponding to the list of ancestor classes from which this derives.
| virtual bool dtDAL::ActorProxy::IsGameActorProxy | ( | ) | const [inline, virtual] |
This is a shortcut to avoid having to dynamic cast to a GameActorProxy.
It should only be overridded by dtGame::GameActorProxy.
Reimplemented in dtGame::GameActorProxy.
| void dtDAL::ActorProxy::AddProperty | ( | ActorProperty * | newProp | ) |
Adds a new property to the this proxy's list of properties.
| ActorProperty * dtDAL::ActorProxy::GetProperty | ( | const std::string & | name | ) |
Gets a property of the requested name.
| name | Name of the property to retrieve. |
| void dtDAL::ActorProxy::GetProperty | ( | const std::string & | name, | |
| PropertyType *& | property | |||
| ) | [inline] |
Templated version of GetProperty (non-const) that auto casts the property to the desired type.
Warning: this uses a static cast, so you are able to shoot yourself in the foot.
| const ActorProperty * dtDAL::ActorProxy::GetProperty | ( | const std::string & | name | ) | const |
Gets a property of the requested name.
(const version)
| name | Name of the property to retrieve. |
| void dtDAL::ActorProxy::GetProperty | ( | const std::string & | name, | |
| const PropertyType *& | property | |||
| ) | const [inline] |
Templated version of GetProperty (const) that auto casts the property to the desired type.
Warning: this uses a static cast, so you are able to shoot yourself in the foot.
| ResourceDescriptor * dtDAL::ActorProxy::GetResource | ( | const std::string & | name | ) |
Gets a ResourceDescriptor of the requested property name.
| name | Name of the resouce to retrieve. |
| const ResourceDescriptor * dtDAL::ActorProxy::GetResource | ( | const std::string & | name | ) | const |
Gets a ResourceDescriptor of the requested property name.
| name | Name of the resouce to retrieve. |
| void dtDAL::ActorProxy::SetResource | ( | const std::string & | name, | |
| ResourceDescriptor * | source | |||
| ) |
Sets a resource in the map.
| name | The name of the resouce | |
| source | The pointer to resource descriptor |
| const ActorProxy * dtDAL::ActorProxy::GetLinkedActor | ( | const std::string & | name | ) | const |
Gets a property of the requested name.
| name | Name of the actor actor property to retrieve. |
| ActorProxy * dtDAL::ActorProxy::GetLinkedActor | ( | const std::string & | name | ) |
Gets a property of the requested name.
| name | Name of the actor actor property to retrieve. |
| void dtDAL::ActorProxy::SetLinkedActor | ( | const std::string & | name, | |
| ActorProxy * | newValue | |||
| ) |
Sets an actor proxy in the map.
| name | The name of the property to set | |
| value | The pointer to new proxy value |
| void dtDAL::ActorProxy::GetPropertyList | ( | std::vector< ActorProperty * > & | propList | ) |
Gets a list of the properties currently registered for this actor proxy.
| void dtDAL::ActorProxy::GetPropertyList | ( | std::vector< const ActorProperty * > & | propList | ) | const |
Gets a const list of the properties currently registered for this actor proxy.
| const ActorType& dtDAL::ActorProxy::GetActorType | ( | ) | const [inline] |
Gets the actor type that represents this actor proxy.
| dtCore::DeltaDrawable * dtDAL::ActorProxy::GetActor | ( | ) |
Gets the actor type that represents this actor proxy.
Actors in the Dynamic Actor Layer are actually synonyms for any Delta3D object. All Delta3D objects that are drawable derive from dtCore::DeltaDrawable. Therefore, an actor is any class that contains dtCore::DeltaDrawable in its inheritance tree.
| void dtDAL::ActorProxy::GetActor | ( | TActorPtr & | actorType | ) | [inline] |
Templated version of GetActor() that static casts the actor to the type passed in.
dtCore::InfiniteLight *light; proxy->GetActor(light);
| const dtCore::DeltaDrawable * dtDAL::ActorProxy::GetActor | ( | ) | const |
Gets the actor who's properties are modeled by this proxy.
| void dtDAL::ActorProxy::GetActor | ( | TActorPtr & | actorType | ) | const [inline] |
Templated version of GetActor() const that static casts the actor to the type passed in.
| void dtDAL::ActorProxy::SetBillBoardIcon | ( | ActorProxyIcon * | icon | ) | [virtual] |
Sets the billboard icon used to represent this actor proxy.
| icon | The billboard to use. |
| ActorProxyIcon * dtDAL::ActorProxy::GetBillBoardIcon | ( | ) | [virtual] |
Gets the billboard icon currently assigned to this actor proxy.
Reimplemented in dtActors::AnimationGameActorProxy, dtActors::BaseLightActorProxy, dtActors::BezierControlPointActorProxy, dtActors::BezierNodeActorProxy, dtActors::Cal3DGameActorProxy, dtActors::CameraActorProxy, dtActors::CoordinateConfigActorProxy, dtActors::GameMeshActorProxy, dtActors::MeshTerrainActorProxy, dtActors::ParticleSystemActorProxy, dtActors::PlayerStartActorProxy, dtActors::PositionalLightActorProxy, dtActors::ProximityTriggerActorProxy, dtActors::SoundActorProxy, dtActors::SpotlightActorProxy, dtActors::StaticMeshActorProxy, dtActors::TaskActorProxy, and dtDAL::WaypointActorProxy.
| const ActorProxy::RenderMode & dtDAL::ActorProxy::GetRenderMode | ( | ) | [virtual] |
Gets the render mode currently active on this actor proxy.
Reimplemented in dtActors::AnimationGameActorProxy, dtActors::BaseLightActorProxy, dtActors::BezierControlPointActorProxy, dtActors::BezierNodeActorProxy, dtActors::Cal3DGameActorProxy, dtActors::CameraActorProxy, dtActors::CoordinateConfigActorProxy, dtActors::GameMeshActorProxy, dtActors::MeshTerrainActorProxy, dtActors::ParticleSystemActorProxy, dtActors::PlayerStartActorProxy, dtActors::PositionalLightActorProxy, dtActors::ProximityTriggerActorProxy, dtActors::SoundActorProxy, dtActors::SpotlightActorProxy, dtActors::StaticMeshActorProxy, dtActors::TaskActorProxy, and dtDAL::WaypointActorProxy.
| virtual void dtDAL::ActorProxy::BuildPropertyMap | ( | ) | [pure virtual] |
This method is called by the actor registry which instructs the proxy to create its properties.
Methods implementing this should be sure to call their parent class's buildPropertyMap method to ensure all properties in the proxy inheritance hierarchy are correcly added to the property map.
Implemented in dtActors::ActionActorProxy, dtActors::AnimationGameActorProxy, dtActors::AutoTriggerActorProxy, dtActors::BaseLightActorProxy, dtActors::BasicEnvironmentActorProxy, dtActors::BezierControllerActorProxy, dtActors::BezierControlPointActorProxy, dtActors::BezierNodeActorProxy, dtActors::Cal3DGameActorProxy, dtActors::CameraActorProxy, dtActors::CloudDomeActorProxy, dtActors::CloudPlaneActorProxy, dtActors::CoordinateConfigActorProxy, dtActors::DeltaObjectActorProxy, dtActors::EnvActorProxy, dtActors::EnvEffectActorProxy, dtActors::GameMeshActorProxy, dtActors::InfiniteLightActorProxy, dtActors::InfiniteTerrainActorProxy, dtActors::MeshTerrainActorProxy, dtActors::MotionActionActorProxy, dtActors::ParticleSystemActorProxy, dtActors::PlayerStartActorProxy, dtActors::PositionalLightActorProxy, dtActors::ProximityTriggerActorProxy, dtActors::SkyBoxActorProxy, dtActors::SkyDomeActorProxy, dtActors::SoundActorProxy, dtActors::SpotlightActorProxy, dtActors::StaticMeshActorProxy, dtActors::TaskActorProxy, dtActors::TaskActorGameEventProxy, dtActors::TaskActorOrderedProxy, dtActors::TriggerActorProxy, dtActors::TripodActorProxy, dtDAL::PhysicalActorProxy, dtDAL::TransformableActorProxy, dtDAL::WaypointActorProxy, and dtGame::GameActorProxy.
| virtual bool dtDAL::ActorProxy::IsPlaceable | ( | ) | const [pure virtual] |
Not all objects are "placeable" in the scene.
For example, an infinite light does not really have a position in the scene, therefore, it is not a placeable actor. Non-placeable actors are still added to a Delta3D scene, they are just not able to be moved around and placed throughout a scene in the same way as a placeable object. Actor proxies of this type are referred to as "global actors".
Implemented in dtActors::AutoTriggerActorProxy, dtActors::BaseLightActorProxy, dtActors::BasicEnvironmentActorProxy, dtActors::BezierControllerActorProxy, dtActors::BezierControlPointActorProxy, dtActors::BezierNodeActorProxy, dtActors::CameraActorProxy, dtActors::EnvEffectActorProxy, dtActors::InfiniteLightActorProxy, dtActors::PositionalLightActorProxy, dtActors::ProximityTriggerActorProxy, dtActors::SpotlightActorProxy, dtActors::TaskActorProxy, dtActors::TriggerActorProxy, dtActors::TripodActorProxy, dtDAL::TransformableActorProxy, and dtDAL::WaypointActorProxy.
| bool dtDAL::ActorProxy::IsGhostProxy | ( | ) | const [virtual] |
if this returns true, this proxy will not be saved into the map useful for having proxies that own other proxies
Reimplemented in dtDAL::WaypointActorProxy.
| void dtDAL::ActorProxy::OnRemove | ( | ) | const [virtual] |
| dtCore::RefPtr< ActorProxy > dtDAL::ActorProxy::Clone | ( | ) | [virtual] |
Creates a copy of this actor proxy and returns it.
The method uses the library manager to create the clone and then iterates though the current state of this proxy's property set and copies their values to the newly created clone.
| const bool dtDAL::ActorProxy::IsInSTAGE | ( | ) | const |
Returns true if called from STAGE.
| bool dtDAL::ActorProxy::operator== | ( | const ActorProxy & | rhs | ) | const [inline] |
| bool dtDAL::ActorProxy::operator!= | ( | const ActorProxy & | rhs | ) | const [inline] |
| void dtDAL::ActorProxy::SetActor | ( | dtCore::DeltaDrawable & | actor | ) | [protected] |
Sets the actor on this proxy.
This should be only called from subclasses
| actor | The actor to set |
| virtual void dtDAL::ActorProxy::CreateActor | ( | ) | [protected, pure virtual] |
Initializes the actor.
Implemented in dtActors::AnimationGameActorProxy, dtActors::AutoTriggerActorProxy, dtActors::BaseLightActorProxy, dtActors::BasicEnvironmentActorProxy, dtActors::BezierControllerActorProxy, dtActors::BezierControlPointActorProxy, dtActors::BezierNodeActorProxy, dtActors::Cal3DGameActorProxy, dtActors::CameraActorProxy, dtActors::CloudDomeActorProxy, dtActors::CloudPlaneActorProxy, dtActors::CoordinateConfigActorProxy, dtActors::DeltaObjectActorProxy, dtActors::EnvActorProxy, dtActors::EnvEffectActorProxy, dtActors::GameMeshActorProxy, dtActors::InfiniteLightActorProxy, dtActors::InfiniteTerrainActorProxy, dtActors::MeshTerrainActorProxy, dtActors::ParticleSystemActorProxy, dtActors::PlayerStartActorProxy, dtActors::PositionalLightActorProxy, dtActors::ProximityTriggerActorProxy, dtActors::SkyBoxActorProxy, dtActors::SkyDomeActorProxy, dtActors::SoundActorProxy, dtActors::SpotlightActorProxy, dtActors::StaticMeshActorProxy, dtActors::TaskActorProxy, dtActors::TaskActorGameEventProxy, dtActors::TaskActorOrderedProxy, dtActors::TaskActorRollupProxy, dtActors::TriggerActorProxy, dtActors::TripodActorProxy, dtDAL::PhysicalActorProxy, dtDAL::TransformableActorProxy, dtDAL::WaypointActorProxy, and dtGame::GameActorProxy.
| void dtDAL::ActorProxy::SetClassName | ( | const std::string & | name | ) | [protected] |
Set the class name.
| name | The class name to set |
| void dtDAL::ActorProxy::RemoveProperty | ( | const std::string & | nameToRemove | ) | [protected] |
Only call from build property map.
friend class ActorPluginRegistry [friend] |
Allow access to the ActorPluginRegistry.
This is so it can set the ActorType of the proxy when it creates it and call any initialization methods on the actor proxy.
Each actor proxy may have a billboard associated with it.
Billboards are displayed in place of the actual actor if the actor has no displable qualities. For example, if a static mesh has no mesh currently assigned to it, the billboard will display instead.