Bug Summary

File:src/modules/asteroidmining/SpicedAsteroidBelt.cc
Location:line 98, column 38
Description:Potential leak of memory pointed to by 'field'

Annotated Source Code

1
2 /* ORXONOX - the hottest 3D action shooter ever to exist
3 * > www.orxonox.net <
4 *
5 *
6 * License notice:
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 *
22 * Author:
23 * remartin
24 * Co-authors:
25 * ...
26 *
27 */
28
29/**
30
31 @file
32 @author remartin
33 @brief Asteroid belt with lots of parameters. Derived from asteroidField.lua
34
35 Generates a ring of asteroids by calling SpicedAsteroidField multiple times.
36 It's in the xy-plane at default, orientation can be changed with tiltAt
37 (angle where it gets elevated/lowered the most) and TiltBy (angle at z-axis).
38 This doesn't work very well and could probably implemented differently with
39 relative coordinates (attach etc, stuff in WorldEntity).
40
41 It is required to wait until all XML-arguments are set. That's why the actual
42 generation happens when tick() gets called for the first time.
43
44*/
45
46
47#include "SpicedAsteroidBelt.h"
48#include "SpicedAsteroidField.h"
49
50#include <algorithm>
51
52#include "core/CoreIncludes.h"
53#include "core/XMLPort.h"
54#include "util/Math.h"
55
56namespace orxonox{
57
58 RegisterClass(SpicedAsteroidBelt)orxonox::SI_I& _SpicedAsteroidBeltIdentifier = (*new orxonox
::SI_I(orxonox::registerClass<SpicedAsteroidBelt>("SpicedAsteroidBelt"
, new orxonox::ClassFactoryWithContext<SpicedAsteroidBelt>
(), true)))
;
59
60 SpicedAsteroidBelt::SpicedAsteroidBelt(Context* context) : BaseObject(context) {
61
62 RegisterObject(SpicedAsteroidBelt)if (ClassIdentifier<SpicedAsteroidBelt>::getIdentifier(
)->initializeObject(this)) return; else ((void)0)
;
63
64 // Default Values:
65 this->count = 250;
66 this->position = Vector3(0,0,0);
67 this->segments = 30;
68 this->minSize = 1;
69 this->maxSize = 50;
70 this->radius0 = 7190;
71 this->radius1 = 7800;
72
73 this->mDensity = 0.3;
74 this->foggy = true;
75 this->fogDensity = 0.5;
76
77 this->tiltAt = 0.0;
78 this->tiltBy = 0.0;
79
80 }
81
82 SpicedAsteroidBelt::~SpicedAsteroidBelt(){
83
84 }
85
86 void SpicedAsteroidBelt::create(){
87
88 float myPi = math::pi;
89 float width = fabs(this->radius1 - this->radius0);
90 float radius = (this->radius1 + this->radius0) / 2.0f;
91 int segmentCount = (int)roundf(this->count / this->segments);
92
93 float dPhi = (2 * myPi) / this->segments;
94 float dTheta = 4.0f*this->tiltBy/this->segments;
95 float sepp = -this->tiltAt;
96 float globi = (myPi/2.0f) + this->tiltBy;
97
98 for(int s = 0; s<segments; ++s){
2
Loop condition is true. Entering loop body
5
Potential leak of memory pointed to by 'field'
99 sepp = sepp + dPhi;
100 if(s<segments/2){
3
Taking false branch
101 globi = globi - dTheta;
102 }else{
103 globi = globi + dTheta;
104 }
105
106 Vector3 pos(radius*cos(sepp)*sin(globi), radius*sin(sepp)*sin(globi), radius*cos(globi));
107
108 SpicedAsteroidField* field = new SpicedAsteroidField(this->getContext());
4
Memory is allocated
109 field->setPosition(this->position + pos);
110 field->setMinSize(this->minSize);
111 field->setMaxSize(this->maxSize);
112 field->setRadius(width);
113 field->setCount(segmentCount);
114 field->setFog(this->foggy);
115 field->setMineralDensity(this->mDensity);
116 field->setFogDensity(this->fogDensity);
117 }
118 }
119
120 void SpicedAsteroidBelt::XMLPort(Element& xmlelement, XMLPort::Mode mode){
121
122 SUPER(SpicedAsteroidBelt, XMLPort, xmlelement, mode)(*ClassIdentifier<SpicedAsteroidBelt>::getIdentifier()->
superFunctionCaller_XMLPort_)(this, xmlelement, mode)
;
123
124 XMLPortParam(SpicedAsteroidBelt, "count", setCount, getCount, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetCountgetCountloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setCount), std::string( "SpicedAsteroidBelt" ) + "::" + "setCount"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetCountgetCountsaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getCount), std::string( "SpicedAsteroidBelt" ) + "::" + "getCount"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetCountgetCount = static_cast<orxonox::XMLPortClassParamContainer
<SpicedAsteroidBelt>*>(ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier()->getXMLPortParamContainer("count"));
if (!xmlcontainersetCountgetCount) { xmlcontainersetCountgetCount
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("count"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetCountgetCountloadexecutor
, xmlcontainersetCountgetCountsaveexecutor); ClassIdentifier<
SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("count", xmlcontainersetCountgetCount); } xmlcontainersetCountgetCount
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
125 XMLPortParam(SpicedAsteroidBelt, "mDensity", setMineralDensity, getMineralDensity, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetMineralDensitygetMineralDensityloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setMineralDensity), std::string( "SpicedAsteroidBelt" ) + "::"
+ "setMineralDensity"); static ExecutorMemberPtr<SpicedAsteroidBelt
> xmlcontainersetMineralDensitygetMineralDensitysaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getMineralDensity), std::string( "SpicedAsteroidBelt" ) + "::"
+ "getMineralDensity"); orxonox::XMLPortClassParamContainer<
SpicedAsteroidBelt>* xmlcontainersetMineralDensitygetMineralDensity
= static_cast<orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>*>(ClassIdentifier<SpicedAsteroidBelt>::getIdentifier
()->getXMLPortParamContainer("mDensity")); if (!xmlcontainersetMineralDensitygetMineralDensity
) { xmlcontainersetMineralDensitygetMineralDensity = new orxonox
::XMLPortClassParamContainer<SpicedAsteroidBelt>(std::string
("mDensity"), ClassIdentifier<SpicedAsteroidBelt>::getIdentifier
(), xmlcontainersetMineralDensitygetMineralDensityloadexecutor
, xmlcontainersetMineralDensitygetMineralDensitysaveexecutor)
; ClassIdentifier<SpicedAsteroidBelt>::getIdentifier()->
addXMLPortParamContainer("mDensity", xmlcontainersetMineralDensitygetMineralDensity
); } xmlcontainersetMineralDensitygetMineralDensity->port(
orxonox_cast<BaseObject*>(this), this, xmlelement, mode
)
;
126 XMLPortParam(SpicedAsteroidBelt, "position", setPosition, getPosition, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetPositiongetPositionloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setPosition), std::string( "SpicedAsteroidBelt" ) + "::" + "setPosition"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetPositiongetPositionsaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getPosition), std::string( "SpicedAsteroidBelt" ) + "::" + "getPosition"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetPositiongetPosition = static_cast<orxonox
::XMLPortClassParamContainer<SpicedAsteroidBelt>*>(ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->getXMLPortParamContainer
("position")); if (!xmlcontainersetPositiongetPosition) { xmlcontainersetPositiongetPosition
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("position"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetPositiongetPositionloadexecutor
, xmlcontainersetPositiongetPositionsaveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("position", xmlcontainersetPositiongetPosition); } xmlcontainersetPositiongetPosition
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
127 XMLPortParam(SpicedAsteroidBelt, "segments", setSegments, getSegments, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetSegmentsgetSegmentsloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setSegments), std::string( "SpicedAsteroidBelt" ) + "::" + "setSegments"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetSegmentsgetSegmentssaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getSegments), std::string( "SpicedAsteroidBelt" ) + "::" + "getSegments"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetSegmentsgetSegments = static_cast<orxonox
::XMLPortClassParamContainer<SpicedAsteroidBelt>*>(ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->getXMLPortParamContainer
("segments")); if (!xmlcontainersetSegmentsgetSegments) { xmlcontainersetSegmentsgetSegments
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("segments"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetSegmentsgetSegmentsloadexecutor
, xmlcontainersetSegmentsgetSegmentssaveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("segments", xmlcontainersetSegmentsgetSegments); } xmlcontainersetSegmentsgetSegments
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
128
129 XMLPortParam(SpicedAsteroidBelt, "maxSize", setMaxSize, getMaxSize, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetMaxSizegetMaxSizeloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setMaxSize), std::string( "SpicedAsteroidBelt" ) + "::" + "setMaxSize"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetMaxSizegetMaxSizesaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getMaxSize), std::string( "SpicedAsteroidBelt" ) + "::" + "getMaxSize"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetMaxSizegetMaxSize = static_cast<orxonox::
XMLPortClassParamContainer<SpicedAsteroidBelt>*>(ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->getXMLPortParamContainer
("maxSize")); if (!xmlcontainersetMaxSizegetMaxSize) { xmlcontainersetMaxSizegetMaxSize
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("maxSize"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetMaxSizegetMaxSizeloadexecutor
, xmlcontainersetMaxSizegetMaxSizesaveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("maxSize", xmlcontainersetMaxSizegetMaxSize); } xmlcontainersetMaxSizegetMaxSize
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
130 XMLPortParam(SpicedAsteroidBelt, "minSize", setMinSize, getMinSize, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetMinSizegetMinSizeloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setMinSize), std::string( "SpicedAsteroidBelt" ) + "::" + "setMinSize"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetMinSizegetMinSizesaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getMinSize), std::string( "SpicedAsteroidBelt" ) + "::" + "getMinSize"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetMinSizegetMinSize = static_cast<orxonox::
XMLPortClassParamContainer<SpicedAsteroidBelt>*>(ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->getXMLPortParamContainer
("minSize")); if (!xmlcontainersetMinSizegetMinSize) { xmlcontainersetMinSizegetMinSize
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("minSize"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetMinSizegetMinSizeloadexecutor
, xmlcontainersetMinSizegetMinSizesaveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("minSize", xmlcontainersetMinSizegetMinSize); } xmlcontainersetMinSizegetMinSize
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
131 XMLPortParam(SpicedAsteroidBelt, "radius0", setRadius0, getRadius0, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetRadius0getRadius0loadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setRadius0), std::string( "SpicedAsteroidBelt" ) + "::" + "setRadius0"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetRadius0getRadius0saveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getRadius0), std::string( "SpicedAsteroidBelt" ) + "::" + "getRadius0"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetRadius0getRadius0 = static_cast<orxonox::
XMLPortClassParamContainer<SpicedAsteroidBelt>*>(ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->getXMLPortParamContainer
("radius0")); if (!xmlcontainersetRadius0getRadius0) { xmlcontainersetRadius0getRadius0
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("radius0"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetRadius0getRadius0loadexecutor
, xmlcontainersetRadius0getRadius0saveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("radius0", xmlcontainersetRadius0getRadius0); } xmlcontainersetRadius0getRadius0
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
132 XMLPortParam(SpicedAsteroidBelt, "radius1", setRadius1, getRadius1, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetRadius1getRadius1loadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setRadius1), std::string( "SpicedAsteroidBelt" ) + "::" + "setRadius1"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetRadius1getRadius1saveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getRadius1), std::string( "SpicedAsteroidBelt" ) + "::" + "getRadius1"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetRadius1getRadius1 = static_cast<orxonox::
XMLPortClassParamContainer<SpicedAsteroidBelt>*>(ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->getXMLPortParamContainer
("radius1")); if (!xmlcontainersetRadius1getRadius1) { xmlcontainersetRadius1getRadius1
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("radius1"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetRadius1getRadius1loadexecutor
, xmlcontainersetRadius1getRadius1saveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("radius1", xmlcontainersetRadius1getRadius1); } xmlcontainersetRadius1getRadius1
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
133 XMLPortParam(SpicedAsteroidBelt, "foggy", setFog, isFoggy, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetFogisFoggyloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setFog), std::string( "SpicedAsteroidBelt" ) + "::" + "setFog"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetFogisFoggysaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::isFoggy), std::string( "SpicedAsteroidBelt" ) + "::" + "isFoggy"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetFogisFoggy = static_cast<orxonox::XMLPortClassParamContainer
<SpicedAsteroidBelt>*>(ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier()->getXMLPortParamContainer("foggy"));
if (!xmlcontainersetFogisFoggy) { xmlcontainersetFogisFoggy =
new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("foggy"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetFogisFoggyloadexecutor,
xmlcontainersetFogisFoggysaveexecutor); ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier()->addXMLPortParamContainer("foggy", xmlcontainersetFogisFoggy
); } xmlcontainersetFogisFoggy->port(orxonox_cast<BaseObject
*>(this), this, xmlelement, mode)
;
134 XMLPortParam(SpicedAsteroidBelt, "fogDensity", setFogDensity, getFogDensity, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetFogDensitygetFogDensityloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setFogDensity), std::string( "SpicedAsteroidBelt" ) + "::" +
"setFogDensity"); static ExecutorMemberPtr<SpicedAsteroidBelt
> xmlcontainersetFogDensitygetFogDensitysaveexecutor = orxonox
::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getFogDensity), std::string( "SpicedAsteroidBelt" ) + "::" +
"getFogDensity"); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>* xmlcontainersetFogDensitygetFogDensity = static_cast<
orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
*>(ClassIdentifier<SpicedAsteroidBelt>::getIdentifier
()->getXMLPortParamContainer("fogDensity")); if (!xmlcontainersetFogDensitygetFogDensity
) { xmlcontainersetFogDensitygetFogDensity = new orxonox::XMLPortClassParamContainer
<SpicedAsteroidBelt>(std::string("fogDensity"), ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier(), xmlcontainersetFogDensitygetFogDensityloadexecutor
, xmlcontainersetFogDensitygetFogDensitysaveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("fogDensity", xmlcontainersetFogDensitygetFogDensity); } xmlcontainersetFogDensitygetFogDensity
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
135
136 XMLPortParam(SpicedAsteroidBelt, "tiltAt", setTiltAt, getTiltAt, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetTiltAtgetTiltAtloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setTiltAt), std::string( "SpicedAsteroidBelt" ) + "::" + "setTiltAt"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetTiltAtgetTiltAtsaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getTiltAt), std::string( "SpicedAsteroidBelt" ) + "::" + "getTiltAt"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetTiltAtgetTiltAt = static_cast<orxonox::XMLPortClassParamContainer
<SpicedAsteroidBelt>*>(ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier()->getXMLPortParamContainer("tiltAt"))
; if (!xmlcontainersetTiltAtgetTiltAt) { xmlcontainersetTiltAtgetTiltAt
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("tiltAt"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetTiltAtgetTiltAtloadexecutor
, xmlcontainersetTiltAtgetTiltAtsaveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("tiltAt", xmlcontainersetTiltAtgetTiltAt); } xmlcontainersetTiltAtgetTiltAt
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
137 XMLPortParam(SpicedAsteroidBelt, "tiltBy", setTiltBy, getTiltBy, xmlelement, mode)static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetTiltBygetTiltByloadexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::setTiltBy), std::string( "SpicedAsteroidBelt" ) + "::" + "setTiltBy"
); static ExecutorMemberPtr<SpicedAsteroidBelt> xmlcontainersetTiltBygetTiltBysaveexecutor
= orxonox::createExecutor(orxonox::createFunctor(&SpicedAsteroidBelt
::getTiltBy), std::string( "SpicedAsteroidBelt" ) + "::" + "getTiltBy"
); orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt>
* xmlcontainersetTiltBygetTiltBy = static_cast<orxonox::XMLPortClassParamContainer
<SpicedAsteroidBelt>*>(ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier()->getXMLPortParamContainer("tiltBy"))
; if (!xmlcontainersetTiltBygetTiltBy) { xmlcontainersetTiltBygetTiltBy
= new orxonox::XMLPortClassParamContainer<SpicedAsteroidBelt
>(std::string("tiltBy"), ClassIdentifier<SpicedAsteroidBelt
>::getIdentifier(), xmlcontainersetTiltBygetTiltByloadexecutor
, xmlcontainersetTiltBygetTiltBysaveexecutor); ClassIdentifier
<SpicedAsteroidBelt>::getIdentifier()->addXMLPortParamContainer
("tiltBy", xmlcontainersetTiltBygetTiltBy); } xmlcontainersetTiltBygetTiltBy
->port(orxonox_cast<BaseObject*>(this), this, xmlelement
, mode)
;
138
139 }
140
141 void SpicedAsteroidBelt::tick(float dt){
142
143 this->create();
1
Calling 'SpicedAsteroidBelt::create'
144 this->destroyLater();
145
146 }
147
148}
149
150