Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F112095172
abstractsystem.tpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, May 7, 15:59
Size
1 KB
Mime Type
text/x-c++
Expires
Fri, May 9, 15:59 (2 d)
Engine
blob
Format
Raw Data
Handle
26028808
Attached To
rSYMKIT symkit
abstractsystem.tpp
View Options
#ifdef _ABSTRACTSYSTEM_TPP_
template <class T>
AbstractSystem<T>::AbstractSystem(const SVector<3>& offset, const QString& label, specs_t flags)
: SKActor(label, flags), offset(offset)
{
}
template <class T>
AbstractSystem<T>::AbstractSystem(const std::initializer_list<T*>& init)
: SKActor("", S_EVOLVE | S_RENDER | S_POSITION), components(init)
{
}
template <class T>
typename AbstractSystem<T>::iterator AbstractSystem<T>::begin()
{
return components.begin();
}
template <class T>
typename AbstractSystem<T>::iterator AbstractSystem<T>::end()
{
return components.end();
}
template <class T>
typename AbstractSystem<T>::const_iterator AbstractSystem<T>::begin() const
{
return components.begin();
}
template <class T>
typename AbstractSystem<T>::const_iterator AbstractSystem<T>::end() const
{
return components.end();
}
template <class T>
void AbstractSystem<T>::attach(T* actor)
{
if (!actor)
{
; // throw an error
}
components.push_back(actor);
}
template <class T>
void AbstractSystem<T>::detach(T* actor)
{
if (!actor)
{
; // throw an error
}
components.remove(actor);
}
template <class T>
void AbstractSystem<T>::detachAll()
{
components.clear();
}
template <class T>
SVector<3> AbstractSystem<T>::position() const
{
return offset;
}
template <class T>
void AbstractSystem<T>::setOffset(const SVector<3>& offset)
{
this->offset=offset;
}
#endif
Event Timeline
Log In to Comment