Initialize a new Sphere in ObjectParser and add it to the scene
This commit is contained in:
parent
0a14661da8
commit
5f02407b06
1 changed files with 4 additions and 1 deletions
|
@ -21,8 +21,11 @@ namespace yaml {
|
||||||
ObjectParser::ObjectParser(Scene& scene,
|
ObjectParser::ObjectParser(Scene& scene,
|
||||||
ParserStack& parsers)
|
ParserStack& parsers)
|
||||||
: ScalarMappingParser(scene, parsers),
|
: ScalarMappingParser(scene, parsers),
|
||||||
|
mObject(new Sphere()),
|
||||||
mSection(NoSection)
|
mSection(NoSection)
|
||||||
{ }
|
{
|
||||||
|
GetScene().add_shape(mObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
ObjectParser::~ObjectParser()
|
ObjectParser::~ObjectParser()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue