i6engine
1.0
|
interpolates light colours and attenuation (e.g. range) For creating a AnimatedLuminousAppearanceComponent, these keys are possible:
Name | Required | Type | Description | Public |
---|---|---|---|---|
diffuseDuration | no | int | duration of one diffuse interpolation cycle | yes |
diffuseKey_<timePoint> | no | Vec3 | diffuse colour at timePoint encoded in name (timePoint between 0 and 1) | yes |
specularDuration | no | int | duration of one specular interpolation cycle | yes |
specularKey_<timePoint> | no | Vec3 | specular colour at timePoint encoded in name (timePoint between 0 and 1) | yes |
attenuationDuration | no | int | duration of one attenuation interpolation cycle | yes |
attenuationKey_<timePoint> | no | Vec4 | attenuation at timePoint encoded in name (timePoint between 0 and 1) | yes |
Public Member Functions | |
AnimatedLuminousAppearanceComponent (const int64_t id, const attributeMap ¶ms) | |
Constructor sets ID and component. More... | |
virtual | ~AnimatedLuminousAppearanceComponent () |
attributeMap | synchronize () const override |
synchronizes the Components state More... | |
std::string | getTemplateName () const override |
returns the name this template was registered with More... | |
virtual std::vector< componentOptions > | getComponentOptions () override |
returns a vector containing all options of the Component being readable and writeable in the editor More... | |
Public Member Functions inherited from i6e::api::LuminousAppearanceComponent | |
LuminousAppearanceComponent (const int64_t id, const attributeMap ¶ms) | |
Constructor sets ID and component. More... | |
virtual | ~LuminousAppearanceComponent () |
void | setLightType (const LightType lightType) |
Sets light type. More... | |
LightType | getLightType () const |
Gets component's light type. More... | |
void | setDiffuseColor (const Vec3 &diffuseColor) |
Sets diffuse colour. More... | |
Vec3 | getDiffuseColor () const |
Gets diffuse colour. More... | |
void | setSpecularColor (const Vec3 &specular) |
Sets specular colour. More... | |
Vec3 | getSpecularColor () const |
Gets specular colour. More... | |
void | setAttenuation (const Vec4 &attenuation) |
Sets attenuation. More... | |
Vec4 | getAttenuation () const |
Gets attenuation. More... | |
void | setDirection (const Vec3 &direction) |
Sets direction. More... | |
Vec3 | getDirection () const |
Gets direction. More... | |
void | setSpotLightInnerRange (double angle) |
sets inner spot light angle More... | |
void | setSpotLightOuterRange (double angle) |
sets outer spot light angle More... | |
Public Member Functions inherited from i6e::api::Component | |
Component () | |
Constructor for Component. More... | |
Component (const int64_t id, const attributeMap ¶ms) | |
Constructor for Component. More... | |
virtual | ~Component () |
Destructor of Component. Must be implemented in derived class. More... | |
void | setOwnerGO (const WeakGOPtr &objGo) |
Sets the GameObject that owns this Component. More... | |
GOPtr | getOwnerGO () |
Get the GameObject that owns this Component. More... | |
uint32_t | getComponentID () const |
Returns the component identification string. More... | |
uint32_t | getFamilyID () const |
Returns the family identification string. More... | |
std::string | getIdentifier () const |
Returns the family identification string. More... | |
void | setDie () const |
component will be deleted soon More... | |
int64_t | getID () const |
returns the id of the component More... | |
virtual void | News (const GameMessage::Ptr &msg) |
Receives messages for this component override this function, if you expect messages. More... | |
void | setSync (bool b) |
sets whether this object has to be synchronized or not More... | |
bool | getSync () const |
void | enableTicking (bool allowTicking) const |
triggers doEnableTicking threadsafe More... | |
void | setSelf (const WeakComPtr &self) |
sets weak_ptr on self for registration of ticker More... | |
std::vector< ComPtr > | getSubComponents () const |
returns all SubComponents attached to this Component More... | |
Protected Member Functions | |
virtual void | Tick () override |
Components can have Tick method like normal Subsystems this method is called by the ObjectController during every Tick if the component registered itself at the ObjectFacade. More... | |
template<typename T > | |
T | interpolate (uint64_t duration, const std::map< double, T > &values) const |
used to interpolate between two following values depending on current time More... | |
Protected Member Functions inherited from i6e::api::Component | |
void | addTicker () |
adds this component to ticklist More... | |
void | removeTicker () |
removes this component from ticklist More... | |
void | doEnableTicking (bool allowTicking) |
sets ticking status for this Component per default all Components are allowed to tick and calling addTicker will start ticking, but in some cases, e.g. for level editor, ticking has to be disabled and just a few components are allowed to tick More... | |
Additional Inherited Members | |
Public Types inherited from i6e::api::LuminousAppearanceComponent | |
enum | LightType { LightType::POINT, LightType::DIRECTIONAL, LightType::SPOT } |
type of the light emitted More... | |
Static Public Member Functions inherited from i6e::api::Component | |
template<typename T > | |
static ComPtr | createC (const int64_t id, const attributeMap ¶ms) |
Protected Attributes inherited from i6e::api::LuminousAppearanceComponent | |
LightType | _lightType |
Vec3 | _diffuseColor |
Vec3 | _specularColor |
Vec4 | _attenuation |
Vec3 | _direction |
Vec3 | _position |
double | _spotlightRangeInner |
double | _spotlightRangeOuter |
Protected Attributes inherited from i6e::api::Component | |
int64_t | _objOwnerID |
ID of the GameObject that owns this Component. More... | |
WeakGOPtr | _objOwnerGO |
Owning GameObject. More... | |
uint32_t | _objComponentID |
Component ID of the Component. More... | |
uint32_t | _objFamilyID |
Family ID of the Component. More... | |
std::vector< ComPtr > | _subComps |
vector containing the other componetns of the same type if this is the dispatcher component More... | |
std::string | _identifier |
identifies the subcomponent More... | |
int64_t | _id |
id of this component More... | |
bool | _sync |
WeakComPtr | _self |
a weak_ptr on the own shared_ptr More... | |
bool | _tickingAllowed |
status if this object is allowed to tick or not More... | |
bool | _wantsToTick |
stores if a Component which isn't allowed to tick want to tick, so it can start ticking when ticking will be allowed More... | |
bool | _isTicking |
stores whether this Component is actually ticking More... | |
interpolates light colours and attenuation (e.g. range) For creating a AnimatedLuminousAppearanceComponent, these keys are possible:
Name | Required | Type | Description | Public |
---|---|---|---|---|
diffuseDuration | no | int | duration of one diffuse interpolation cycle | yes |
diffuseKey_<timePoint> | no | Vec3 | diffuse colour at timePoint encoded in name (timePoint between 0 and 1) | yes |
specularDuration | no | int | duration of one specular interpolation cycle | yes |
specularKey_<timePoint> | no | Vec3 | specular colour at timePoint encoded in name (timePoint between 0 and 1) | yes |
attenuationDuration | no | int | duration of one attenuation interpolation cycle | yes |
attenuationKey_<timePoint> | no | Vec4 | attenuation at timePoint encoded in name (timePoint between 0 and 1) | yes |
Definition at line 47 of file AnimatedLuminousAppearanceComponent.h.
i6e::api::AnimatedLuminousAppearanceComponent::AnimatedLuminousAppearanceComponent | ( | const int64_t | id, |
const attributeMap & | params | ||
) |
Constructor sets ID and component.
|
virtual |
|
overridevirtual |
returns a vector containing all options of the Component being readable and writeable in the editor
Reimplemented from i6e::api::LuminousAppearanceComponent.
Reimplemented in i6e::api::AnimatedSpotLightComponent.
|
inlineoverridevirtual |
returns the name this template was registered with
Reimplemented from i6e::api::LuminousAppearanceComponent.
Reimplemented in i6e::api::AnimatedSpotLightComponent.
Definition at line 61 of file AnimatedLuminousAppearanceComponent.h.
|
inlineprotected |
used to interpolate between two following values depending on current time
Definition at line 74 of file AnimatedLuminousAppearanceComponent.h.
|
overridevirtual |
synchronizes the Components state
Reimplemented from i6e::api::LuminousAppearanceComponent.
Reimplemented in i6e::api::AnimatedSpotLightComponent.
|
overrideprotectedvirtual |
Components can have Tick method like normal Subsystems this method is called by the ObjectController during every Tick if the component registered itself at the ObjectFacade.
Reimplemented from i6e::api::Component.