Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F111488688
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
Fri, May 2, 14:43
Size
1 KB
Mime Type
text/x-c++
Expires
Sun, May 4, 14:43 (2 d)
Engine
blob
Format
Raw Data
Handle
25925942
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