Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/source/simulation2/components/ICmpVisual.h
Show All 18 Lines | |||||
#define INCLUDED_ICMPVISUAL | #define INCLUDED_ICMPVISUAL | ||||
#include "simulation2/system/Interface.h" | #include "simulation2/system/Interface.h" | ||||
#include "ps/CStr.h" | #include "ps/CStr.h" | ||||
#include "maths/BoundingBoxOriented.h" | #include "maths/BoundingBoxOriented.h" | ||||
#include "maths/BoundingBoxAligned.h" | #include "maths/BoundingBoxAligned.h" | ||||
#include "maths/Fixed.h" | #include "maths/Fixed.h" | ||||
#include "maths/FixedVector3D.h" | |||||
#include "lib/file/vfs/vfs_path.h" | #include "lib/file/vfs/vfs_path.h" | ||||
class CUnit; | class CUnit; | ||||
/** | /** | ||||
* The visual representation of an entity (typically an actor). | * The visual representation of an entity (typically an actor). | ||||
*/ | */ | ||||
class ICmpVisual : public IComponent | class ICmpVisual : public IComponent | ||||
Show All 28 Lines | public: | ||||
* Return the filename of the actor to be used for projectiles from this unit, or the empty string if none. | * Return the filename of the actor to be used for projectiles from this unit, or the empty string if none. | ||||
* (Not safe for use in simulation code.) | * (Not safe for use in simulation code.) | ||||
*/ | */ | ||||
virtual std::wstring GetProjectileActor() const = 0; | virtual std::wstring GetProjectileActor() const = 0; | ||||
/** | /** | ||||
* Return the exact position where a projectile should be launched from (based on the actor's | * Return the exact position where a projectile should be launched from (based on the actor's | ||||
* ammo prop points). | * ammo prop points). | ||||
* Return type is CFixedVector3D because it is exposed to the JS interface. | |||||
* Returns (0,0,0) if no point can be found. | * Returns (0,0,0) if no point can be found. | ||||
*/ | */ | ||||
virtual CVector3D GetProjectileLaunchPoint() const = 0; | virtual CFixedVector3D GetProjectileLaunchPoint() const = 0; | ||||
/** | /** | ||||
* Returns the underlying unit of this visual actor. May return NULL to indicate that no unit exists (e.g. may happen if the | * Returns the underlying unit of this visual actor. May return NULL to indicate that no unit exists (e.g. may happen if the | ||||
* game is started without graphics rendering). | * game is started without graphics rendering). | ||||
* Originally intended for introspection purposes in Atlas; for other purposes, consider using a specialized getter first. | * Originally intended for introspection purposes in Atlas; for other purposes, consider using a specialized getter first. | ||||
*/ | */ | ||||
virtual CUnit* GetUnit() = 0; | virtual CUnit* GetUnit() = 0; | ||||
▲ Show 20 Lines • Show All 102 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator