OpenStudio:utilities
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Static Public Member Functions | List of all members
openstudio::ThreeScene Class Reference

#include <ThreeJS.hpp>

Public Member Functions

std::vector< ThreeGeometrygeometries () const
 
boost::optional< ThreeGeometrygetGeometry (const std::string &geometryId) const
 
boost::optional< ThreeMaterialgetMaterial (const std::string &materialId) const
 
std::vector< ThreeMaterialmaterials () const
 
ThreeSceneMetadata metadata () const
 
ThreeSceneObject object () const
 This method is renamed to 'threeSceneObject()' in C#. More...
 
 ThreeScene (const ThreeSceneMetadata &metadata, const std::vector< ThreeGeometry > &geometries, const std::vector< ThreeMaterial > &materials, const ThreeSceneObject &sceneObject)
 constructor More...
 
 ThreeScene (const std::string &json)
 constructor from JSON formatted string, will throw if error More...
 
std::string toJSON (bool prettyPrint=false) const
 print to JSON More...
 

Static Public Member Functions

static boost::optional
< ThreeScene
load (const std::string &json)
 load from string More...
 

Detailed Description

ThreeScene is an adapter for a scene in the three.js geometry format, defined at: https://github.com/mrdoob/three.js/wiki/JSON-Object-Scene-format-4.

The class is not impl-ized in hopes that it can be ported to JavaScript via emscripten

Constructor & Destructor Documentation

openstudio::ThreeScene::ThreeScene ( const ThreeSceneMetadata metadata,
const std::vector< ThreeGeometry > &  geometries,
const std::vector< ThreeMaterial > &  materials,
const ThreeSceneObject sceneObject 
)

constructor

openstudio::ThreeScene::ThreeScene ( const std::string &  json)

constructor from JSON formatted string, will throw if error

Member Function Documentation

std::vector<ThreeGeometry> openstudio::ThreeScene::geometries ( ) const
boost::optional<ThreeGeometry> openstudio::ThreeScene::getGeometry ( const std::string &  geometryId) const
boost::optional<ThreeMaterial> openstudio::ThreeScene::getMaterial ( const std::string &  materialId) const
static boost::optional<ThreeScene> openstudio::ThreeScene::load ( const std::string &  json)
static

load from string

std::vector<ThreeMaterial> openstudio::ThreeScene::materials ( ) const
ThreeSceneMetadata openstudio::ThreeScene::metadata ( ) const
ThreeSceneObject openstudio::ThreeScene::object ( ) const

This method is renamed to 'threeSceneObject()' in C#.

std::string openstudio::ThreeScene::toJSON ( bool  prettyPrint = false) const

print to JSON